[lxc-users] Correct way to rsync /var/lib/lxd

Mark Constable markc at renta.net
Sun Aug 9 02:28:42 UTC 2015


On Sat, 8 Aug 2015 06:32:26 PM Serge Hallyn wrote:
> > I'm just trying to do a simple rsync backup of /var/lib/lxd/ to a local NAS
> 
> Not valid - is that because the NAS only supports a single uid, i.e. it's vfat
> or somesuch?  Or does it support a smaller range?

No it's a ubuntu 15.04 server based HP microserver running btrfs RAID10.
 
> > rsync: recv_generator: mkdir "/mbox/var/lib/lxd/containers" (in backups)
> > failed: Permission denied (13)

What I neglected to mention is that I am using rsync:: direct without going via
SSH and there is my (doh, brainfart) problem. The remote rsyncd daemon is running
as a single non-root user and I obviously need to rsync as root... via SSH!

Yes, doing that as I type, problem solved.

> You could just tar up each container directory, or the whole thing, and back
> that up.

Gladly I won't have to resort to that compared to an incremental rsync via cron.

A few questions though...

Should I be able to use btrfs send/receive?

Would that be more efficient than rsync?

Any other "native" methods for backing up containers?

Thanks for your help and sorry about the noise.



More information about the lxc-users mailing list