4

I have a Linux virtual machine with two disks, one is mounted as / and the other one as /home. I'd like to take a snapshot of / but not of /home so that I can later come back to a clean system and keep my data.

Is there anyway of achieving this?

2 Answers 2

4

After a bit more searching on the virtual box forum, I discovered that there is a type of virtual hard drives not affected by snapshots: writethrough.

To convert the disk, I first had to detach any differencing disk attached to it and then run this on the command line:

VBoxManage.exe modifyhd <path to vdi file> --type writethrough

After this, everything seems to work fine.

2

I don't know if there's a way to do this or not, but it's probably easier using Guest Additions to mount a folder from your host OS as /home, that way any changes to data there are unaffected by the snapshot.

4
  • that's currently my setup actually :) I currently copy my /home into a shared folder before restoring a snaphost, but it's not ideal. just wanted to see if there was a better way.
    – Locksfree
    Commented Jun 11, 2011 at 14:26
  • Oh--haha. I have never done this before, but why copy the contents? Does restoring the snapshot actually overwrite the contents of the folder on your host OS? If so, what happens when you disable Guest Additions before restoring the snapshot and then re-enabling them after?
    – jsejcksn
    Commented Jun 11, 2011 at 14:37
  • hum no it does not overwrite my host files; but it does revert my /home disk so I sync it to a shared folder first, then restore and then sync back. I am just looking for a "lazier" way :)
    – Locksfree
    Commented Jun 11, 2011 at 15:05
  • Thanks for your help, but I will accept my own answer after I found out how to do what I wanted last night.
    – Locksfree
    Commented Jun 13, 2011 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .