Appearance
常用运维命令
启动/重启服务
数据库
bash
systemctl restart postgresql-13.service缓存存储
bash
systemctl restart redis.service文件存储
bash
systemctl restart minio.service消息队列
bash
systemctl restart rabbitmq-server.service文件预览
bash
systemctl restart supervisord.serviceubuntu版本
bash
systemctl restart supervisor.service搜索引擎
bash
systemctl restart elasticsearch.serviceNginx
bash
systemctl restart nginx.service织信服务
新版本安装器,由于account/biz安装了服务,可以直接通过服务进行管理:
bash
systemctl restart informat-account
systemctl restart informat-biz旧版本安装器:
bash
cd {informat-next}
ls instance
ps -ef|grep {instanceName}
./informat restart informat-account
./informat restart informat-bizTIP
{informat-next}: 织信Next目录
{instanceName}: ls instance返回的节点名称
检查服务状态
数据库
bash
systemctl status postgresql-13.service缓存存储
bash
systemctl status redis.service文件存储
bash
systemctl status minio.service消息队列
bash
systemctl status rabbitmq-server.service文件预览
bash
systemctl status supervisord.serviceubuntu版本
bash
systemctl status supervisor.service搜索引擎
bash
systemctl status elasticsearch.serviceNginx
bash
systemctl status nginx.service织信服务
新版本安装器,由于account/biz安装了服务,可以直接通过服务进行管理:
bash
systemctl status informat-account
systemctl status informat-biz旧版本安装器:
bash
ps -ef|grep informat-*工具脚本
数据库备份
以下是一个数据库服务器在本机,数据库用户为postgres的数据库备份的参考脚本
bash
#!/bin/bash
current=`date "+%Y%m%d%H%M%S"`
# 保存的文件路径
bake=backup_db/$current
# 数据库密码
PGPASSWORD=xxxxx
mkdir -p $bake
echo '备份Account数据库...'
pg_dump -h 127.0.0.1 -O -p 5432 -U postgres -d db_informat2_account_prd > $bake/db_informat2_account_prd.sql
echo '备份Biz数据库...'
pg_dump -h 127.0.0.1 -O -p 5432 -U postgres -d db_informat2_biz_prd_0 > $bake/db_informat2_biz_prd_0.sql
