Commit 8c6046c5 authored by 郑伟's avatar 郑伟

补全步骤

parent f04606ae
1 备份mysql,pg,rdb
## 备份mysql,pg,rdb
ssh ubuntu@wanmeizhensuo.com
cd /var/lib/redis
sudo tar cvzf dump.tar.gz dump.rdb
......@@ -10,22 +11,30 @@ 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
## 迁移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
import database
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 ./
2 backend停机
3 迁移mysql, pg和rdb到阿里云环境
4 修改dns
## 修改dns
- www.wanmeizhensuo.com 115.28.113.225
- www.gengmei.cc 121.42.152.76
......@@ -33,4 +42,4 @@ scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.tar.gz ./
- market.gengmei.cc 115.28.242.181
- hera.gengmei.cc 115.29.97.14
5 qa复查 没有问题既宣布测试成功
\ No newline at end of file
## qa复查 没有问题既宣布测试成功
\ No newline at end of file
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