How do you handle backing up databases (Docker + Backrest/Restic setup)?
retained text
Hey Guys, I using Backrest for backing up my data. But i installed it with root privileges (--root). Which i did because at that moment it felt right. But now it doest. As it got root priviliges. But i also dont know how else i could mimic my current approach. Binary over docker: * I choose as binary because i would needed to mount everytime i add a system to be backuped the path to its data. Sounded error prone. (even tho everything at the moment is in a extra partion /srv/data/<service>/... * Required sqlite installed (i mean i got make my own docker image but that felt a step to much) So i installed it as root because: * i feared that some backup files belong to root hence i thought lets give it root so i can copy/back up the files (even tho im using linux since 2018 im a very big noob tbh :D) * Require to docker compose down/up before/after the snapshot was backed up (for immich e.g) to prevent database corruption. For example: * Plan Immich-Local-Network-Backup starts at 04:00 which in turn required that the container is offline, and only after that i wanted to run the backup stuff. * If i e.g. do it via a cron job i need to sync the times of the cron job + the backup plan. Which sounded sub optimal Is this bad practice? How you guys do it? Is there a security risk(but what isnt?)? Im using pangolin to "expose" my services via a WireGuard Tunnel. Backrest is not accessible even via pangolin. But the ports are x:x so its accessible (with authentification in my entire local network). Not sure if i should limit it to 127.0.0.1? am i overthink it? Backrest is setup with a secure(at least the vaultwarden generation claims so i guess) password.
document fetched 2026-10-27 00:30 · canonical https://reddit.com/r/selfhosted/comments/1xfqpq5/how_do_you_handle_backing_up_databases_docker