vm img backup - i think?


Recommended Posts

I know I should have tested this before starting something "production" in a vm, but I didn't really.  If someone could verify my process should work, while I setup a new machine to test on, that would be appreciated (or if you have a "faster" way).

 

[note: VM is running and I don't want to shutdown to do a backup]

I have my btrfs cache drive and a vm installed at

 

`/mnt/cache/domains/UbunutServer/vdisk1.img`

 

so in the vdisk directory I run the command

 

> cp --reflink vdisk1.img vdisk1.bk.img

 

Appears to work just as the FAQ says.  I then run:

> rsync --progress vdisk1.bk.img /mnt/user/BackupShare/userver-backup/

 

file appears to copy fine. Yay!??

 

I assume I can shutdown the VM and simply copy that file back from the backup share, rename to `vdisk1.img` and start up the VM and the VM will load back to the state i took the the `reflink` copy?

 

Thank you!

Link to comment
30 minutes ago, JorgeB said:

It means to VM will start as if recovering from a crash/power loss.

Right... i figured that could be the case (i.e. files not written out to disk maybe lost/corrupted).  Thanks for verifiying.

I've found a number of places that talk about live snapshots, but have yet to find a good guide on it (specificlly for unraid ideally, but any kvm howto would be good); do you know of any?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.