0

I recently had a mishap on my VM, where for somereason the settings of my BridgeNetwork got changed randomly. I had to spend quite a bit of time to figure out the root cause. Rightnow, I manually copy paste the VM into another folder which is then periodically backedup to Google-Drive. However, when I tried to copy the backup to the original folder under "C:\Users\username\VirtualBox VMs\", I couldnt startup both of the VMs (the latest one and the one from the backup), as it complained that the VMs had same UUIDs. I was able to figure out how to rectify this issue, but would like to prevent this kind of issue and make this process automated (https://stackoverflow.com/a/49471969/4752883)

While debugging this issue, I came accross 3 solutions to backup the drive, and am trying to figure out whether one process is better than the other, for automating the backup process at regular intervals of time.

  1. export/import the VM
  2. copy paste the VM folder
  3. clone the VM

From this article https://forums.virtualbox.org/viewtopic.php?f=1&t=63079, it seems atleast in 2014, copying the folder is better process. However, copying the folder isn't allowed when the VM is actually running. Cloning and exporting the VM is allowed, when the VM is running. Since my VM is running almost all the time, I would have to manually shutdown the VM and then copy the VM folder, which would defeat the purpose of automation. So it seems that the only 2 options are exporting the VM or `cloning the VM. Further, if I copy the VM folder, and then try to bring up the copy of the VM and the VM itself, the UUIDs will clash. As a result I wont be able to bring both of them up online at the same time to debug any issues.

Just to future proof this solution, these are some requirements that I came up with to backup the VM

  1. ability to automate the backup at a period of 7 days
  2. ability to run the backup without having to stop the VM
  3. ability to move the backup from one computer to another (to reduce risk of computer failure)
  4. ability to save the backup folder on another drive (to prevent harddisk failure)
  5. ability to bring up both the VMs at the same time without too much work
  6. preserve all settings (snapshots, ip addresses, configurations) from the current VM
  7. ability to transfer to other VM softwares (VMware etc) in future. This is a nice to have feature, but not necessary, and I am unlikely to move to VMWare in the near future.

Questions

  1. If I copy paste the folder into another folder, and then zip it up, it seems I cant restore it back along with the original repo, as UUIDs will clash. So is it better instead to clone it and then create a zip file of that for backup?

  2. If I export the VM as a appliance, will it retain all the settings of the VM (snapshots, ip addresses, etc), while just giving it new UUIDs and creating a archive?

  3. What combination of commands can I use to satisfy the requirements atleast 1-6, and if possible 7?

0

I would recommend you performing an exportation when you can, or upon configuration changes; but keep the day to day backup with a backup-specific software. That way you can keep the deltas more efficiently, making use of deduplication, compression, encryption, etc.

You have several backup solutions to use, free and proprietary. Which one to choose depends on the guest OS, as well as personal preference.

With this approach you cover from 1-4. After that:

For 5, both VMs at the same time, you can probably clone the current state and restore the backup on the second one.

Requirement 6 is confusing, IP addresses are part of the operating system, not the VM configuration, so this will be backed up if you back up the OS. Configurations will not, but if you have an export upon configuration changes you are covered.

For requirement 7, you have VMware Converter to move the computer, then you can move the whole strategy to VMware.

I hope it helps.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.