Backing up a VM

This is for discussing general topics about how to use VirtualBox.
Post Reply
adrianh
Posts: 46
Joined: 26. Aug 2009, 21:42
Primary OS: Other
VBox Version: OSE other
Guest OSses: Win7

Backing up a VM

Post by adrianh »

Is it possible yet to backup a VM without loosing the snapshots? If so, what files do I need to save. Are they relative path or absolute path dependent?

All the information I've seen is that all snapshots must be merged to the backup, which kinda invalidates the reason for having them. I can see as an appliance that it would want to be merged, but not as a backup.

Thanks,


A
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Backing up a VM

Post by Sasquatch »

Since version 4.0, VMs are more 'portable'. If you create a backup of the VM folder, you have everything you need. The base VDI, snapshot, settings,everything. If you're concerned about paths, you can always check the settings file for it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
abcuser
Volunteer
Posts: 595
Joined: 10. May 2007, 20:03
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Windows XP

Re: Backing up a VM

Post by abcuser »

The only think you have to be careful in v4.0 is if you have migrated from v3.x, the folder structure is preserved and the Sasquatch advice will not help you!Read more in manual: http://www.virtualbox.org/manual/ch10.html#id270886

I migrated from v3.2 to v4.0 in the following way:
1. deleted all snapshots to have single vdi file - copied this file to save location
2. created print-screen of VirtualBox virtual machine settings (to have a reference)
3. uninstalled VirtualBox v3.2 and deleted all files that were left over (in my case in Windows xp host: deleted folders c:\program files\Oracle\Virtualbox and c:\document and settings\[user]\.VirtualBox)
4. install VirtualBox v4.0
5. create new virtual machine - during creation I have selected existing disk and when dialog window on selecting existing disk image appeared - I have manually copied vdi file from step 1 to the c:\document and settings\[user]\VirtualBox VMs\[virual_machine_folder] and mark disk in dialog
6. set all other settings in virtual machine recorder as print-screen in step 2.

Now I have a vbox v4.0 folder layout and I can copy/paste c:\document and settings\[user]\VirtualBox VMs\[virual_machine_folder] to save location to make a full backup of whole virtual machine including snapshots.
Post Reply