How do you back up your Virtual Machine

6,191

Solution 1

Backing up the .vdi file (virtual disk image) on a regular basis has some major disadvantages.

First: the Backup becomes pretty large, because you cannot do differential backups, meaning, that when something minimal is changed on the disk image (since it is the virtual hard drive it changes all the time) you can't take advantage of saving just the files that changed because it is only one file. You will have to backup the whole image.

Second: when the machine is running, while you back it up, you have a high chance of getting an inconsistent backup, because the backup program needs some time to walk through the big image. So you would need to turn off the vm.

What you could do, is to use the snapshot feature of VMs. Then you would only have to backup the snapshots, which are way smaller than the virtual disk image and static. Or you could allow the VM to share a folder on your real hardware like explained here, or even better, use a separate fileserver like e.g. samba, if you have the resources, and then simply use guest-side backup to that folder with any backup program you like, or the built-in backup, that comes with the guest-os. The last would be my favorite, because then you get to use all the features, that a built-in backup system comes with.

Solution 2

If you are using virtual machine manager, you will have a "clone" option.

By right-clicking on the virtual machine's entry, you will see the "clone" option.

Also, you could backup the virtual machine by copying the virtual machine image.

The images are stored by default in /var/lib/libvirt/images/. You will need super user privileges(sudo) to read the data here.

I would recommend you power off the guest operating system in question before you back it up.

Solution 3

Just copy virtual disc files and also vm files on other location. Thats it. You have a backup.

Share:
6,191

Related videos on Youtube

Neil
Author by

Neil

Updated on September 18, 2022

Comments

  • Neil
    Neil over 1 year

    A quick question. I am running a Windows Server 2008 Virtual Machine on Ubuntu using Virtual Machine Manager. My question is I want to make regular back up of the Virtual Machine as its very important since the VM is our DC on our network. Any suggestions?