How to create snapshots *without* a specific partition?

This is for discussing general topics about how to use VirtualBox.
Post Reply
shadowdemon
Posts: 9
Joined: 21. Jun 2009, 12:58
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, winxp
Location: Germany

How to create snapshots *without* a specific partition?

Post by shadowdemon »

First oof, I'm using Linux as host and guest. If I'm using snapshots as diff-backups of an offline VM, is there a way to create the snapshot without the VDI that contains the swap file/partition?

My point being that once I have copied the original VM from server A to server B (including swap VDI), I would like to be able to create offline snapshots without the swap VDI, to reduce the size of the snapshots that have to be copied over the Internet.

Ideally, I would rather make online backups, but then the snapshot would have to contain the RAM (say 2GB) and the SWAP (say, 3GB), which means I would have to transfer 5GB "garbage" everyday over the Internet, to get my real data. That would take for ever and be a real waste of bandwidth. So I'm hoping to have reboot-once-a-day cycle where I create a new snapshot which will then allow me to use the last one as backup, and it would be nice if the swap VDI wasn't part of it. Maybe I could somehow clear the swap partition as the last command before the system goes down, making it a zero diff for the swap VDI?
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: How to create snapshots *without* a specific partition?

Post by baf »

Create new vdi of say 2G size connect that as hardisk2 create one 2GB swap partition.
Change initrd and fstab to point to new harddisk.
Then either skip coping the swap snapshot or set disk mode mode to immutable or write-through ( see manual).

You will not be able to save/resume/hibernate the guest from within linux but from virtualbox it should be ok.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
Post Reply