<div dir="ltr">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.<div><br></div><div>thanks again,</div><div><br></div><div>Spike</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 8, 2017 at 1:44 AM Fajar A. Nugraha <<a href="mailto:list@fajar.net">list@fajar.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Wed, Mar 8, 2017 at 12:08 AM, Spike <span dir="ltr" class="gmail_msg"><<a href="mailto:spike@drba.org" class="gmail_msg" target="_blank">spike@drba.org</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I'm on Ubuntu Xenial running LXD from PPA + a ZFS storage backend.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">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.</div><div class="gmail_msg"><br class="gmail_msg"></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"></div><div class="gmail_msg">First thing first, I think everybody agrees that you need /var/lib/lxd with lxd's database + the containers' fs.</div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Yes, but they have different requirements. </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">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)</div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">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.<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Both might work. Depending on how well your send/receive mechanism handles new/deleted/renamed dataset.</div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"></div><div class="gmail_msg">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.</div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Too much additional cpu and disk usage ...</div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">Third, I found people using the image export command to generate tarballs which are then copied over to the backup host.</div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">... and unnecessary additional complexity.</div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">can anybody provide some recommendations from experience running lxc in a production environment with zfs?</div><div class="gmail_msg"><br class="gmail_msg"></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">I use sanoid + syncoid (<a href="https://github.com/jimsalterjrs/sanoid" class="gmail_msg" target="_blank">https://github.com/jimsalterjrs/sanoid</a>). Works well, with the catch that (for syncoid's case) I need to manually specify which datasets I want to backup.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">-- </div><div class="gmail_msg">Fajar</div></div></div></div>
_______________________________________________<br class="gmail_msg">
lxc-users mailing list<br class="gmail_msg">
<a href="mailto:lxc-users@lists.linuxcontainers.org" class="gmail_msg" target="_blank">lxc-users@lists.linuxcontainers.org</a><br class="gmail_msg">
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></blockquote></div>