【Safesync】如何備份/還原Safesync的DB及File



步驟如下:
Backup:
1. login safesync server CLI console
2. 輸入以下指令進行檔案壓縮備份
#sudo -i
#cd /home/safesync
#mysqldump -u root -p –all-databases | gzip > /home/safesync/dbbackup.sql.gz
#cd /storage/mogdata
#tar -czvf /home/safesync/dev11.bak.tgz dev11
3. 將上述壓縮備份好之檔案複製到他處
upload dbbackup.sql.gz & dev11.bak.tgz to another server
Restore:
1. login safesync server CLI console
2. 將備份的檔案放置回safesync資料夾中
#sudo -i
#cd /home/safesync
download dbbackup.sql.gz & dev11.bak.tgz
3. 將檔案進行解壓縮
#gunzip dbbackup.sql.gz
#mysql -u root -psafesync <dbbackup.sql
#tar -zxvf dev11.bak.tgz -C /storage/mogdata/




近期迴響