I would like to back up my nextcloud data using duplicati, but I absolutely can‘t figure out how to give Duplicati access to the Nextcloud volume. Both are running fine in separate Docker containers. I can’t figure out how to properly mount the volume, below is my current compose for duplicati. Do I need to mount the volume as source? Does it need to be declared or mapped separately?

---
version: "2.1"
services:
  duplicati:
    image: lscr.io/linuxserver/duplicati:latest
    container_name: duplicati
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=XXX
      - CLI_ARGS= #optional
    volumes:
      - /path/to/appdata/config:/config
      - /path/to/backups:/backups
      - /path/to/source:/var/lib/docker/volumes/073ac2751cd65ffd84750e578c38482905c3c7e4851a8cbb0bbbc5c33a285e84
    ports:
      - 8200:8200
    restart: unless-stopped
  • GlitzyArmrest@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    You might try adding :rw after each of your volume paths, like this:

    volumes:
          - /path/to/appdata/config:/config:rw
    

    My honest suggestion would be to ditch Duplicati for Duplicacy. Duplicacy is one time payment, but it’s much more polished than Duplicati. I actually had major issues with recovering files from Duplicati; sometimes it would work and sometimes it wouldn’t. Not ideal for something as critical as backup software.

    • skilltheamps@feddit.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      But it should not need write access to those files.

      I bet it is due to different UID. Nextcloud runs with the www-data user, and UID 1000 is likely whatever user OP set up on the host machine. Make Duplicati run with the same UID as nextcloud and it will have the permission to read the files.

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

          I just went through dockerizing my nextcloud installation. The www-data user on my host had uid 33, but the one inside the container uses uid 82, which had me scratching my head for a minute. You can confirm the actual uid by running id www-data inside the nextcloud container.

          • redcalcium@lemmy.institute
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            1 year ago

            I have two instances on two separate servers running and all of them use uid:gid 33:33 inside the container. I use the nextcloud:26-apache docker image.

            Edit: I think your container image is based on Alpine linux, which use uid 82 for its www-data user. Try switching to a debian-based image (e.g. the apache version) if you want it to match with your host system.

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

              Ah yep I bet that’s it, I’m using the alpine fpm image.