You are not logged in.

#1 2026-02-21 16:24:00

whiteman808
Member
Registered: 2024-04-13
Posts: 32

Backing up lxc containers using restic

I have running unprivileged lxc containers on ext4 filesystem at vps. What are chances that doing live backup of lxc containers and sending it to the remote server will lead to inconsistent data at containers running services like PostgreSQL, MariaDB? What can I do with it?

Offline

#2 2026-03-05 19:46:39

ua4000
Member
Registered: 2015-10-14
Posts: 551

Re: Backing up lxc containers using restic

I expect 99% inconsistent data,

the issue are the open databases.

Find a solution which stops or freezes lxc, then backup, then restart / unfreeze the container.
restic is very fast, so the downtime could be very short.
Or use sql dumps, then the chances are much better to copy a running system in a good state.

Offline

#3 2026-03-05 22:19:00

whiteman808
Member
Registered: 2024-04-13
Posts: 32

Re: Backing up lxc containers using restic

Should I expect inconsistent system state and data if I do a live backup of the non-database containers running things like nginx, prosody, postfix, dnsmasq? Can doing live backup of them with restic running on the host lead to broken system inside containers after restoring them? Do exist any advantages of running restic inside each container instead of single restic process doing backups on the host, including non-database containers?

Offline

Board footer

Powered by FluxBB