Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Dec 2014 15:59:32 -0800
From:      Peter Grehan <grehan@freebsd.org>
To:        John <freebsd-lists@potato.growveg.org>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: backups of bhyve images
Message-ID:  <54863B64.5010608@freebsd.org>
In-Reply-To: <20141208163358.GA52969@potato.growveg.org>
References:  <20141208163358.GA52969@potato.growveg.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi John,

> Basically, what I want to do is to run accurate backups without shutting
> down and restarting the VM. Is this possible? If it isn't, I think the
> only alternative is to make a script that shuts the vm down, copies it,
> restarts the vm then runs its compression and backup-over-ssh routine.

  It's not possible in the general case to take a snapshot of the 
underlying image since as others have pointed out, it may not be 
consistent on disk since there are still data/metadata from the guest's 
filesystem that haven't made it out to disk.

  Commercial hypervisors provide guest tools that allow a filesystem 
quiesce/sync that lock-steps with external snapshotting machinery.

  However, one option that could be worth investigating is using ZFS in 
the guest with disk images backed by a zvol on the host. ZFS guarantees 
on-disk consistency, and a zvol provides instantaneous snapshots. Worst 
case is that some writes are not picked up at snapshot time, but that 
seems preferable to having to force a full sync in the guest.

later,

Peter.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54863B64.5010608>