Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
docs
Commits
8c6046c5
Commit
8c6046c5
authored
Jun 16, 2015
by
郑伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补全步骤
parent
f04606ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
transfer.md
transfer.md
+18
-9
No files found.
transfer.md
View file @
8c6046c5
1 备份mysql,pg,rdb
## 备份mysql,pg,rdb
ssh ubuntu@wanmeizhensuo.com
ssh ubuntu@wanmeizhensuo.com
cd /var/lib/redis
cd /var/lib/redis
sudo tar cvzf dump.tar.gz dump.rdb
sudo tar cvzf dump.tar.gz dump.rdb
...
@@ -10,22 +11,30 @@ pg_dump -U postgres -W -h 127.0.0.1 > pg.sql
...
@@ -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
mysqldump -u work -p -h 10.6.5.246 zhengxing > zhengxing.sql
tar cvzf sql.tar.gz .
tar cvzf sql.tar.gz .
## backend停机
sudo supervisorctl stop all
## 迁移mysql, pg和rdb到阿里云环境
ssh ubuntu@121.42.156.188
ssh ubuntu@121.42.156.188
cd /data/dump/
cd /data/dump/
scp ubuntu@42.62.78.49:/data/sql.tar.gz ./
scp ubuntu@42.62.78.49:/data/sql.tar.gz ./
scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.rdb ./
scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.rdb ./
tar xf sql.tar.gz
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
ssh root@121.42.57.27
cd /var/lib/redis
cd /var/lib/redis
scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.tar.gz ./
scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.tar.gz ./
2 backend停机
## 修改dns
3 迁移mysql, pg和rdb到阿里云环境
4 修改dns
-
www.wanmeizhensuo.com 115.28.113.225
-
www.wanmeizhensuo.com 115.28.113.225
-
www.gengmei.cc 121.42.152.76
-
www.gengmei.cc 121.42.152.76
...
@@ -33,4 +42,4 @@ scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.tar.gz ./
...
@@ -33,4 +42,4 @@ scp ubuntu@wanmeizhensuo.com:/var/lib/redis/dump.tar.gz ./
-
market.gengmei.cc 115.28.242.181
-
market.gengmei.cc 115.28.242.181
-
hera.gengmei.cc 115.29.97.14
-
hera.gengmei.cc 115.29.97.14
5 qa复查 没有问题既宣布测试成功
## qa复查 没有问题既宣布测试成功
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment