On Mon, May 1, 2017 at 12:49 AM, Andrey Repin <anrdae...@yandex.ru> wrote:
> Greetings, Spike! > > > thank you for sharing Fajar, this is very helpful. A couple questions: > > 1. how do you ensure data consistency? I don't think it's safe to take a > > snap of a mysql container with mysql running for example. Other backup > > solutions I've used in the past, like bacula for example, allowed you to > run > > pre-backup jobs to say make the db readonly or stuff like that. Are you > doing such a thing with sanoid? > > 2. related to, if you move lib/lxd, is it safe to snap with lxd running? > no consistency issues? > > It is never a good idea to snapshot the disk of a running system. > On an ideal world, sure. In reality, when your options are limited between "shutdown your apps every night before backups" or "perform storage-level-snapshot which doesn't interfere with the running system and can be brought to consistent state", I chose the later. > Any files opened for writing are unlikely to backup properly. > Filesystem and database journaling is written with that in mind, so they can safely deal with (e.g.) half-(over)written files. > It is less of an issue for MySQL and other applications that use journaling > for their write operations, but on any given live system there's more apps > that don't expect power interruptions. > > If you have one of those apps, I highly recommend you fix it, or find another one that behave correctly. You don't want to be left out cold when a real power interruption (or server crash) happens. -- Fajar
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users