Moving files from your storage (backup) server using RSYNC
You can already FTP into your storage server to download backups and then upload them to your production server but what if your backup is large? It’s not going to be quick to download a backup then upload it using FTP so you can use RSYNC to move any files from your storage server to your production server.
To get started, log into your storage server as the root user using the details in your welcome email. You can see a list of historical emails we have sent you from your client area by navigating to the following link
Once logged in by ssh issue the below command
cd /home/Storage ; ls
You should now see a list of cPanel backups, find the username of the account you want to restore to your production server, in this guide we’re using the username first2host. So the cPanel will backup would look like first2host.tar.gz
Next, we use the RSYNC function to move the backup from the storage server to your production server. Login by ssh to your production server and issue the below command swapping the IP, username to the username of your backup file.
rsync -avz -e "ssh -p 2123" root@SOURCEIP:/home/Storage/first2host.tar.gz* /home/
Let’s break this down
- Ssh -p 2123 – This is the port ssh is running on, on your storage server. You shouldn’t need to change this unless you change the ssh port
- root@SOURCEIP – Swap SOURCEIP for your storage servers IP
- /home/Storage/first2host.tar.gz* – Swap first2host for your backups username. It’s important to leave the * in the link
Once you have modified the RSYNC code, it’s best to copy the line above and edit it in a text document then enter it into the ssh console you will be asked for a password. Enter the root password of your storage server and hit enter The file will then be copied from your storage server to your production server into the /home directory. You can then log into WHM and click “restore a full cPanel backup” and select the file you just moved to the server from the drop-down list.
How was this article?