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
68caf6e0
Commit
68caf6e0
authored
Jun 16, 2015
by
郑伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改格式
parent
8c6046c5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
transfer.md
transfer.md
+22
-21
No files found.
transfer.md
View file @
68caf6e0
## 备份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
...
...
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