SIGN IN

    Site transfer VestaCP

    In the process of transferring sites using the VestaCP server control panel, it is recommended to use the transfer method using the built-in backups in VestaCP, if possible. When using the native backup feature, all data will be transferred, including mailboxes, letters, settings, crons and other settings. If you use the method of copying site files, then only the site files and the database will be transferred, the rest of the settings will be lost. Please note that in this case mail and PHP-FPM configurations will also not be migrated. And they need to be moved further.

    Transferring sites from VestaCP to VestaCP using backups.

    First, copy the backups from the previous server to the new server using the rsync or scp command. The following are examples of commands to run on a new server:

    rsync -avzhP root@ip:/backup/admin*.tar /backup/

    or

    scp -r root@ip:/backup/admin*.tar /backup/

    Where ip is the IP address of the old server, admin*.tar is the archive with the required date and time. When using these commands on a new server, you will need to enter the password for the old server. When entering a password, it is not displayed.

    Restoring from a backup.

    After copying the backups, extract them on the new server. If the new server does not contain backups, you can add sites and databases with the command:

    v-restore-user USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]

    If there are difficulties, or the command cannot be selected, specify the full path for execution and the required parameters:

    /usr/local/vesta/bin/v-restore-user USER BACKUP

    This command also has optional parameters: [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR]
    ​An example of using the v-restore-user command:

    v-restore-user admin admin*.tar

    For example, if you want to transfer the site backup of user "new" to a new server where this account has not yet been created, follow these steps:

     1.    Copy the "new" user archive, for example: "new.2023-07-08_05-11-16.tar" to the "/home/backup" folder on the new server. Where 2023-07-08_05-11-16 is the date and time of the backup. Using the scp command on the old server:

    scp /home/backup/new.2023-07-08_05-11-16.tar IP-new-server:/home/backup/

    2.     Run the v-restore-user command on the new server for the "new" user:

    v-restore-user new new.2023-07-08_05-11-16.tar

         For the standard user "admin", enter the username "admin". Run the v-restore-user command for the "admin" user:

    v-restore-user admin admin.2023-07-08_05-11-16.tar

    If there are errors when restoring the site, database, mail or cron, you will receive a notification.

    3.     If you want to restore only the web domain without the database and other settings, use the following command:

    Examples of using the v-restore-user command:

    /usr/local/vesta/bin/v-restore-user admin admin.2023-06-06_01-01-01.tar '' 'no' 'no' 'no' 'no' 'no' 'no'

    This command will only restore site files, skipping the database and other settings in the VestaCP panel.

     

    Transferring a site from a database to another user within the same server.


    If you want to transfer the site and database to another user, rename the archive name Next, restore data from the backup and specify a new name. If the username does not exist on the server, an account will be created automatically.

     

    Note. If you are running as a user other than root, you may need to start commands with "sudo" in the console.

     

    Thus, we learned how to independently transfer sites by copying backups and deploying them on a new server.