How to take backup from one server and move to another server using SSH
Login to the current server SSH (Putty) from where the backup has to be generated.
Go to the home directory.
Enter the below command to generate the backup on the server.
sudo /scripts/pkgacct Username
username is the particular domain’s username.
Once the backup is completed, move the backup file to a particular account so that the backup should be downloadable.
Enter the below command for moving the backup file to a particular account.
mv cpmove-$user.tar.gz /home/$user/public_html
cpmove-$user.tar.gz is the backup file name.
$user is the username of the account, where the backup file is being moved.
After moving the backup to a particular account, correct the file permission of the backup file.
Go the current path where the backup file is moved.
Change the file permission to 644.
chmod 644 cpmove-$user.tar.gz
Now the backup file can be downloaded. So the next step.
Login to the New server SSH, where the backup has to be moved.
Download the backup file on the new server by running the below command.
Where, http://$userdomain/cpmove-$user.tar.gz is the backup file link.
Run the below command for restoring the backup on the new server.
sudo /scripts/restorepkg backup file name ex: username.tar.gz