Docker containers aren't showing to backup

Hi everyone,

I’m fairly new to Ubuntu/Docker/Duplicati.

I’ve got Duplicati running in a docker container setup using docker compose which is as follows:

    image: linuxserver/duplicati
    container_name: duplicati
      - TZ=${TZ}  
      - PUID=1000
      - PGID=999
      - ${USERDIR}/duplicati:/config
      - ${USERDIR}/duplicati/backups:/backups
      - ${USERDIR}:/source
      - 8200:8200
    restart: always

Now, when going into the GUI and selecting the source files/folders I want to backup (for me, this is my containers), nothing is showing either when selecting source, or, anything past the home directory where my docker folder is. I’m suspecting this has something to do with folder permissions.

For my setup, PUID is 1000, PGID is 999 as per below:

puid=1000(efleming) gid=1000(efleming) groups=1000(efleming),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lxd),999(docker)

Any suggestions would be greatly appreciated. Is running Duplicati through a container more trouble than it is worth?

I love docker containers, but I haven’t used Duplicati in that fashion yet.

You probably know that a docker container can’t by default see anything “outside” of the container. If you want Duplicati to be able to back up files on the host, you’ll need to map a volume.

Looks like you have a few mapped:

      - ${USERDIR}/duplicati:/config
      - ${USERDIR}/duplicati/backups:/backups
      - ${USERDIR}:/source

Is the data you want to back up in ${USERDIR} ? (I presume this variable corresponds to the home folder for the user account under which the docker container runs) If so that data should be visible under “/source” from the container’s perspective.

If I were to run Duplicati in a docker container I’d probably have to expose the root directory of the host, but I’m not sure what you are trying to back up.

Permissions can also be an issue as you mentioned - the UID/GID you are running the container as needs to have permissions to the folders you want to back up.

Good luck

Did you manage to solve this? I have the same problem as you have.

A docker container won’t see the host’s files by default. If you are wanting to back up files on the host machine, you’ll need to create bind mounts: