How to restore VPSes on a new CR from backup?

Have more questions? Submit a request

Applicable to:

  • SolusVM 2

Question

How to restore VPSes on a new CR from backup?

Answer

1. Connect to MN via SSH

2. Create a backup of MN:

# /usr/local/solus/bin/installer -backup

3. Access database:

# docker exec -it $(docker ps -q -f name=solus_postgres | head -n1) psql -U$(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_USER | awk -F "=" {'print $2'}) $(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_DB | awk -F "=" {'print $2'})

4. Update storage_id for the VPSes:

# UPDATE compute_resource_vms SET storage_id=NEW_STORAGE_ID where compute_resource_id=OLD_CR_ID;

5. Update compute_resource_id for the VPSes:

# UPDATE compute_resource_vms SET compute_resource_id=NEW_CR_ID where compute_resource_id=OLD_CR_ID;

Note: Replace OLD_CR_ID with Old CR ID, NEW_CR_ID with new CR ID and NEW_STORAGE_ID with storage ID of the new CR

6. Reinstall all the VPSes with any OS image. This is necessary to restore configurations.

7. Restore VPSes from backups at SolusVM 2 > Virtual Servers > VPS > Backup

 

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.