hadn't seen sanoid, very cool, my zfs tooling is still pretty bare and I'm
generally using obnam for linux backups. I was planning on finding
something for automatic zfs snapshots and I guess sanoid answers that
question, thank you. Also very nice trick to put lib/lxd under zfs too,
hadn't thought of it.

thanks again,

Spike

On Wed, Mar 8, 2017 at 1:44 AM Fajar A. Nugraha <l...@fajar.net> wrote:

> On Wed, Mar 8, 2017 at 12:08 AM, Spike <sp...@drba.org> wrote:
>
> Hi,
>
> I'm on Ubuntu Xenial running LXD from PPA + a ZFS storage backend.
>
> I've been reading everything I could find on backup strategies, but I've
> not found anything "official" or that even looked like a best practice so I
> thought I'd ask the list.
>
>
>
>
> First thing first, I think everybody agrees that you need /var/lib/lxd
> with lxd's database + the containers' fs.
>
>
> Yes, but they have different requirements.
>
> An extreme case, if you have a fixed, never changing amount of containers,
> you only need to backup /var/lib/lxd once. FWIW, I also put /var/lib/lxd on
> zfs (I usually use the dataset name 'data/lib/lxd', with mountpoint set
> manually to /var/lib/lxd)
>
>
> For the FS, given ZFS, it seems that a snapshot + send|receive should do,
> however I'm unclear if one can simply snap and move the entire pool or if
> there are reasons why images should be snap'ed individually and sent over.
>
>
> Both might work. Depending on how well your send/receive mechanism handles
> new/deleted/renamed dataset.
>
> The other approach I found is entirely different and 100% lxd based in
> which case you run LXD on the backup host too, snap containers, and then
> publish an image from the snaps to the backup host.
>
>
> Too much additional cpu and disk usage ...
>
> Third, I found people using the image export command to generate tarballs
> which are then copied over to the backup host.
>
>
> ... and unnecessary additional complexity.
>
> can anybody provide some recommendations from experience running lxc in a
> production environment with zfs?
>
>
> I use sanoid + syncoid (https://github.com/jimsalterjrs/sanoid). Works
> well, with the catch that (for syncoid's case) I need to manually specify
> which datasets I want to backup.
>
> --
> Fajar
> _______________________________________________
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to