ZFS snapshot as vm image backup

Discussion in 'Other Operating Systems' started by kripz, Sep 14, 2016.

  1. kripz

    kripz Member

    Joined:
    Sep 29, 2004
    Messages:
    2,834
    Location:
    Near Frankston
    So i've got my vm hdd image on a zfs volume, what would be the problems, if any, of using zfs snapshots to take a backup? The snapshot would be saved to file or remote zfs.

    I'm hoping the snapshot of the running machine would be the equivalent of the machine not shutting down properly, which to me, is not that risky for this data.
     
  2. oh_noes

    oh_noes Member

    Joined:
    Oct 29, 2006
    Messages:
    991
    Location:
    Australia
  3. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    45,602
    Location:
    Brisbane
    That's pretty much it. How reliable that is depends on how busy the VM is, and the software it uses.

    You can minimise the impact by running things like "sync" under Linux, or an equivalent under Windows (forcing a flush of all caches to disk) before the snapshot runs, although that can be a bit tricky as you need to do it inside the VM (perhaps an SSH-key based one-shot command that does it?).
     
  4. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    10,270
    Location:
    Briz Vegas
    Is not a good practice, for the snapshot to be any good the VM must be in a static state, but more importantly all updates and actions be in a completed state. Pausing the VM (Xen suspend, KVM suspend, VMware pause, HyperV NFI) then snapshot will guarantee recovery.

    BUT, this does not guarantee that any application running on the server is in a recoverable state, especially DB's, so you will need to stop or pause these so they are in a recoverable state first.

    What is the use case?
     

Share This Page

Advertisement: