Page 1 of 1

How to create snapshots *without* a specific partition?

Posted: 10. Aug 2009, 13:49
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?

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

Posted: 10. Aug 2009, 17:28
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.