Disaster Recovery ??

longhair

Member
Jun 27, 2014
113
0
16
On my test server, I have 4 hard drives with 4 VMs and decided to perform a clean install of the Proxmox drive to simulate a disaster.

I was able to restore the drives and I see the contents (vm-100-disk-1, ... , vm-103-disk-1) on the drives.

How do I restore the actual VMs back to their working state? I do not have any backup files from Proxmox.
 
I don't know if this is the correct way of doing this but this is what I have done to get it to work. This is a general guide as I don't have Proxmox running at the moment.

Created a new VM (ID 200) with the same OS & hardware as vm-100-disk-1 (no install disk)
As root in the shell: cd /etc/pve/local/qemu-server
nano 200.conf
Changed vm-200-disk-1 to vm-100-disk-1
Saved as 100.conf
VM100 booted without issue :D
 
Last edited:
For your disaster recovery scenario you need:
a.VPS Part
- backup VM file: vm-100-disk-1
- backup VM config: such as 100.conf
- backup Proxmox config: /etc/pve/....

b. Linux Part
- backup /etc config, such as /etc/network/...
- any custom config according to your system board, NIC, etc
- any additional libs/drivers

100.conf is a simpel config file, you may make it by editing existing conf or manually create new.
 
Hi,
I guess there is an typo and you mean "vm-200-disk-1 to vm-100-disk-1"?!

BTW. it's allways an good idea to have an backup of /etc/pve (VM-configs, storage-definitions...).

Udo

you need need to backup /etc/pve.

/etc/pve is just a fuse mountpoint to the real config sqlite database :

/var/lib/pve-cluster/config.db

So, it's enough to backup this file :)
 
you need need to backup /etc/pve.

/etc/pve is just a fuse mountpoint to the real config sqlite database :

/var/lib/pve-cluster/config.db

So, it's enough to backup this file :)
Hi Spirit,
but if you only want to recover one VM on an existig (and running) pve-node the saved content of /etc/pve is much easier than the config.db-file.

Udo
 
Hi,
I guess there is an typo and you mean "vm-200-disk-1 to vm-100-disk-1"?!

BTW. it's allways an good idea to have an backup of /etc/pve (VM-configs, storage-definitions...).

Udo

Yes, that was a typo.

I see that there are a lot of directories and files in /etc/pve. What directories and files would I have to make backups of? I ask because if I had to reinstall Proxmox, I assume authkey.pub and pve-www.key would be regenerated making the old ones useless. I say this because I didn't realize until now that they were even there.

For your disaster recovery scenario you need:
a.VPS Part
- backup VM file: vm-100-disk-1
- backup VM config: such as 100.conf
- backup Proxmox config: /etc/pve/....

b. Linux Part
- backup /etc config, such as /etc/network/...
- any custom config according to your system board, NIC, etc
- any additional libs/drivers

100.conf is a simpel config file, you may make it by editing existing conf or manually create new.

Very informative to this Linux newbie. Thank you.

you need need to backup /etc/pve.

/etc/pve is just a fuse mountpoint to the real config sqlite database :

/var/lib/pve-cluster/config.db

So, it's enough to backup this file :)

What you are saying is I just have to backup /var/lib/pve-cluster/config.db and it will backup all the required directories and files in /etc/pve ?

Hi Spirit,
but if you only want to recover one VM on an existig (and running) pve-node the saved content of /etc/pve is much easier than the config.db-file.

Udo

What is the difference between backing up /etc/pve and the config.db?

Once I learn the basics, I will be adding a NAS for external backups and eventually a second Proxmox machine in case of hardware failure.
 
Yes, that was a typo.

I see that there are a lot of directories and files in /etc/pve. What directories and files would I have to make backups of? I ask because if I had to reinstall Proxmox, I assume authkey.pub and pve-www.key would be regenerated making the old ones useless. I say this because I didn't realize until now that they were even there.
simply backup the whole content - is very small - like "tar cvf /backup/etc_pve.tar /etc/pve"

What you are saying is I just have to backup /var/lib/pve-cluster/config.db and it will backup all the required directories and files in /etc/pve ?
the content of /etc/pve is stored inside an sqlite-db which is config.db - so, if you save config.db you can (and must) recover the whole content of /etc/pve
What is the difference between backing up /etc/pve and the config.db?
With an copy of /etc/pve (like the tar-file above) you can restore the content to another place, like an pve-node with running VMs, move the restored VM-config to the qemu-server-dir and you see the VM in the gui (you need the VM disk-files also of course).

With the config.db you can easily restore the whole /etc/pve on an new installed node - but not part of this.

Also depends on the usage - like so often.

Udo