How to migrate OpenVZ VPS manually using backup/restore procedure?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to migrate OpenVZ VPS manually using backup/restore procedure?

Answer

  1. Connect to source node via SSH
  2. Create a dump of the source VPS using below commands:

    # mkdir /home/backup
    # vzdump --compress --dumpdir /home/backup 101

    where:
    --compress - compress the dump file (results in a .tgz).
    --dumpdir - the directory where the dump will be stored, default is /vz/dump.

  3. Transfer the backup file to destination server using scp or rsync utility.
  4. Connect to destination node via SSH
  5. Restore the backup in a new container on destination using the following command:

    # vzdump --restore /path/to/backupfile.tgz CTID

    where CTID is a VPS container ID

  6. Start the VPS once restoration is complete:

    # vzctl start 101

  7. If both source and destination nodes are in one SolusVM cluster let the SolusVM master node know the new slave server of the VPS by executing the following command on master node:

    # /scripts/vm-migrate [VSERVERID] [NEWNODEID]

    Otherwise, import the migrated VPS into SolusVM using this instruction.

 

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.