Safe backups for my setup using restic.


I have quite a few applications running in docker containers. (For example gitea, jenkins, node-red, nextcloud, bookstack). Sarkari Result The all store their data in separate directories mounted as volumes in the docker container.

I want to back up the applications using ‘restic’ as I like it. Pnr Status I have a few options.

  1. For each application, shut down the docker container, perform backup, restart container.

  2. For each application use LVM snapshot and back up the snapshot

  3. Just back up the volume as it is.
    i want to check my assumptions.

  4. This is the only method that I can 100% guarantee to work as the application will be shut down for the backup.

  5. This will at least give a consistent backup. It will likely work reliably with any application that is able to reliably survive crashes and power outages

  6. Probably not the best idea as it might capture inconsistent updates to files?

Is this correct, and what do other people do to get reliable backups?


Option 3 is the worst possible option, and your suspicion about it is correct: restic cannot capture an atomic point-in-time state of the entire filesystem, so it is possible for a backup to be corrupt due to capturing different effective states of a service/process across multiple files (or even within the same file).

Option 1 will definitely work, though it requires downtime.

Option 2 will likely work if the services are able to handle a power cut (as you’ve mentioned), and requires no downtime.

For what it’s worth, I use LVM snapshots as the basis for restic backups both for my personal server at home, and multiple production database servers at work.