Best Practices for Backup and Reinstall of Working Environment?

mattlach

Well-Known Member
Mar 23, 2016
169
17
58
Boston, MA
Hi Everyone,

I have a 7.4-3 Proxmox standalone server I have been putting off updating, as I am about to get a new server, and when I do I intend to do a clean install anyway.

I use a mix of KVM and LXC, and all of my datastores use ZFS.

Are there any guides and/or best practices on how to best export/reimport all of my virtual machines and move it to the new server?

The plan is to just move over the same HBA and drives that already have the ZFS storage pools on them. Is it enough to do that, and then just click around and import existing containers and VM's or is there something I should do before taking the existing server offline?

I appreciate any suggestions and/or links to guides.

Thanks,
Matt
 
Last edited:
Back up your "/etc" folder and the "/var/lib/pve-cluster/config.db". "/etc" stores some Debian configs like network and zvdump. The config.db contains all the other PVE settings (which are mounted from the DB to "/etc/pve").
Your disks on the HBA only store the virtual disks. None of the configs you need to run a VM/LXC!
 
Last edited:
  • Like
Reactions: mattlach
Back up your "/etc" folder and the "/var/lib/pve-cluster/config.db". "/etc" stores some Debian configs like network and zvdump. The config.db contains all the other PVE settings (which are mounted from the DB to "/etc/pve").
Your disks on the HBA only store the virtual disks. None of the configs you need to run a VM/LXC!
Thank you.

I guess once I import the configs, I just need to make sure the ZFS volumes mount in the same place again, and it should "just work"?

Or will I need to reimport storage volumes into the PVE system? I'm guessing those are configured in the config.db file as well, so I won't have to?

Much obliged,
Matt
 
Or will I need to reimport storage volumes into the PVE system? I'm guessing those are configured in the config.db file as well, so I won't have to?
storage.cfg is part of the config.db. So yes, your storage definitions should be restored. But if you for example got other ZFS pools besides rpool you would need to import them using "zpool import" and so on.
 
  • Like
Reactions: mattlach
storage.cfg is part of the config.db. So yes, your storage definitions should be restored. But if you for example got other ZFS pools besides rpool you would need to import them using "zpool import" and so on.
Thank you, appreciate the info!

Yeah, I've been managing ZFS pools manually from the command line for over a decade, so that part I have figured out.

I think what I will do is this:

1.) Back up all config files from old server
2.) Install fresh copy of Proxmox on new server
3.) Shut down, and transplant server guts into old case, and installing SAS HBA, and NVMe drives)
4.) Power back up, zpool import, etc.
5.) copy over config files
6.) reboot (for good measure)
7.) Troubleshoot. (I mean, at least one thing is guaranteed to break, right? :p )

At the very least I am going to have to edit the network config, as the interfaces will have new names...

Does the current version of Proxmox still use if up/down or am I going to have to figure out how to convert this massive /etc/network/interfaces file to a netplan yaml format?

Edit:

Actually, I just looked at my /etc/network/interfaces, and it is much smaller than I remember it being. I remember it being this huge and complex file with all of my vlans identified in it at one point, but it seems to have become simpler?

I have upgraded this server in place since Proxmox VE 4.1, so maybe things got simpler int he background at some point, and I didn't notice...

At one point I had a complicated gigabit network setup with 8 different interfaces, many in aggregated mode, and I distinctly remember having to edit the thing in console without access to copy and paste because it had gone offline, which was a nightmare :p Then there was the time the network interface names changed on me (eth0, eth1, eth2, etc) and I had to go in and manually reorder them back where they were, which also was a nightmare. At least we don't have to worry about that anymore with modern interface names defined by the kernel module name...
 
Last edited:
Don't forget to disable autostart for VMs that make use of any passthrough so it for example won't remove an important wrong device from the host, like the memory controller, right after boot. And make sure to choose the same hostname.

Does the current version of Proxmox still use if up/down or am I going to have to figure out how to convert this massive /etc/network/interfaces file to a netplan yaml format?
Yes, ifupdown2 with /etc/network/interfaces.
 
  • Like
Reactions: mattlach
storage.cfg is part of the config.db. So yes, your storage definitions should be restored. But if you for example got other ZFS pools besides rpool you would need to import them using "zpool import" and so on.

Do you know if Proxmox cares about the ZFS ID of the pool, or does it just look at the mountpoint?

If I were to completely replace one of the pools, zfs send/recv the data from the old pool to the new pool and then give it the same mount location, would it work or would it complain that it isn't the same pool?

Appreciate all of your help,
Matt
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!