Commit 68caf6e0 authored by 郑伟's avatar 郑伟

修改格式

parent 8c6046c5
## 备份mysql,pg,rdb
ssh ubuntu@wanmeizhensuo.com
cd /var/lib/redis
sudo tar cvzf dump.tar.gz dump.rdb
- ssh ubuntu@wanmeizhensuo.com
- cd /var/lib/redis
- sudo tar cvzf dump.tar.gz dump.rdb
ssh ubuntu@42.62.78.49
cd /data
pg_dump -U postgres -W -h 127.0.0.1 > pg.sql
mysqldump -u work -p -h 10.6.5.246 zhengxing > zhengxing.sql
tar cvzf sql.tar.gz .
- ssh ubuntu@42.62.78.49
- cd /data
- pg_dump -U postgres -W -h 127.0.0.1 > pg.sql
- mysqldump -u work -p -h 10.6.5.246 zhengxing > zhengxing.sql
- tar cvzf sql.tar.gz .
## backend停机
sudo supervisorctl stop all
- sudo supervisorctl stop all
## 迁移mysql, pg和rdb到阿里云环境
ssh ubuntu@121.42.156.188
cd /data/dump/
scp ubuntu@42.62.78.49:/data/sql.tar.gz ./
scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.rdb ./
tar xf sql.tar.gz
- ssh ubuntu@121.42.156.188
- cd /data/dump/
- scp ubuntu@42.62.78.49:/data/sql.tar.gz ./
- scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.rdb ./
- tar xf sql.tar.gz
mysql -u work -h rdsfewzdmf0jfjp9un8xj.mysql.rds.aliyuncs.com -p
createdb -U postgres -W -h 127.0.0.1 zhengxing
dropdb -U postgres -W -h 127.0.0.1 zhengxing
psql -U postgres -W -h 127.0.0.1 zhengxing < pg.sql
- mysql -u work -h rdsfewzdmf0jfjp9un8xj.mysql.rds.aliyuncs.com -p
- createdb -U postgres -W -h 127.0.0.1 zhengxing
- dropdb -U postgres -W -h 127.0.0.1 zhengxing
- psql -U postgres -W -h 127.0.0.1 zhengxing < pg.sql
ssh root@121.42.57.27
cd /var/lib/redis
scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.tar.gz ./
- ssh root@121.42.57.27
- cd /var/lib/redis
- scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.tar.gz ./
## 修改dns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment