I am trying to setup a restic job to backup my docker stacks, and with half of everything owned by root it becomes problematic. I’ve been wanting to look at podman so everything isn’t owned by root, but for now I want to backup my work I built.

Also, how do you deal with some docker containers having databases. Do you have to create exports for all docker containers that have some form of database?

I’ve spent the last few days moving all my docker containers to a dedicated machine. I was using a mix of NFS and local storage before, but now I am doing everything on local NVME. My original plan was having everything on NFS so I would worry about backups there, and I might go back to that.

  • ElevenNotesB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Don’t run docker as root, don’t run containers as root, pretty simple to be honest.

  • Zeal514B
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    First, I try not to have it owned by root. But some containers have special privileges that need to be followed.

    So rsync -O will copy the directory retaining permissions and ownership of all files.

  • MoneyVirusB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    only backup of the data i need to backup (mapped volumes).

    Restore: create fresh container and map volumes again.