Use old backups with changed VM-ID


Jul 8, 2021

i had to edit some of my VMs and change their IDs because i accidently restored a wrong, old backup with an identical VM-ID. So i changed them to be unique which actually worked pretty well.
But now i realized that with the changed IDs i cannot use my previously created backups on my PBS anymore.
Is there a way for me to rename the PBS backups as well so that they match my new IDs? Or do i have to create all my backups fresh from scratch and have to give up my old ones?

Thanks in advance!
If I understand correctly, you have:

A VM which was VMID 100 and it is, say, 2000
Old Backups with VMID 100
New backups with VMID 2000

Given that the chunks are shared among all the snapshots so they won't use "double" the space even if the "same" VM is backed up with two VMID's, this is what I would do:

1.- Create a namespace "BackupsWithOldVMIDs" in the same datastore.
2.- Create a replica to move the backups with the old VMID to ns "BackupsWithOldVMIDs"
3.- Delete the snapshots from the original location. As we now have the same snapshots in "BackupsWithOldVMIDs" namespace, their chunks won't be removed, so you wont lose these backups.
4.- Add a note in PBS writing down the new VMID for each VM
5.- Add a note in PBS writing down the old VMID for each VM
6.- After some time (weeks, months, years?) remove the old backups with the old VMIDs.

(4 and 5 will help you remember which VM is each one depending on how old the backup you are trying to restore).

I suppose there is some way to do the rename you want by messing with the index files, but I don't know if there are side effects related with that, so I prefer a safer, proven way.
  • Like
Reactions: AraToken
Thank you for the response Victor!
I guess that your method is the best i can do in this case. Thanks for that!
I would not want to mess with any index files simply because i am not experienced enough with that so i might give that a pass. Still, would be interesting to know if that would work.


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!