Lxc export to a tar ball seems to work great but should it be done on a running container?
It can be done on a running container, but if you don’t want to wait until next millenium you should probably not try it on a huge container on a dir-based storage, since such a storage does not support fast snapshots. It will probably block the container too. On Zfs or btrfs it is doable (not fast, lxc export is not fast, just not much slower than exporting a stopped container)
Yes, it is slow, using ZFs, but on small containers it only take about 5 minutes. But I am worried about data consistency.
Well shapshots are only going good at the file level, if you use databases all bets are off (Oracle probably does not support Linux containers).
Yes, whatever is in memory might be lost.
Anyway, IMHO, it is not consistent to allow “lxc export” and not “lxc copy” on a running container…
I suggest to add a --force option in the 2 cases.