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 account.first2host.co.uk. Select your name on the top right then, email history.
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" [email protected]:/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
- [email protected] – 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?
You might also like
More from All About Linux
Install Ioncube Loaders In Ubuntu, Debian, CentOS and AlmaLinux
Ioncube Loaders are a piece of software that is used to protect the underlying code in PHP applications. Its aim …
How to install FTP and configure FTP on an Ubuntu 22 LTS instance
If you need to upload files to your NVMe VPS you have a couple of options. You can use a …
How to install a Cloudflare Origin SSL Certificate – NGINX
An SSL Certificate is vital to encrypt data between you and your clients. SSLs can be complicated things. If they …
[…] the cPanel accounts to an offsite location, format the server and reinstall the software then use RSYNC to move the accounts back to the server for […]