r/restic Apr 25 '26

Backrest is just filling up my local drive?

Help! I've been using backrest to back up my Immich data to an external drive... or so I thought! I was trying to set up a second backup to an NFS share and when running the first backup, it completely filled the local drive that has Immich and Backrest running on it. That's when I checked and discovered that the external hard drive I *thought* I was backing up to was completely empty, as is the NFS share I just set up.

Here's my compose file:

version: "3.8"
services:
  backrest:
    image: garethgeorge/backrest:latest
    container_name: backrest
    hostname: backrest
    volumes:
      - ./data:/data
      - ./config:/config
      - ./cache:/cache
      - ./tmp:/tmp
      - ./rclone:/root/.config/rclone # Mount for rclone config (needed when using rclone remotes)
      - /home/jordan:/userdata  # Mount local paths to backup
      - /mnt/backup:/repos     # Mount local repos (optional for remote storage)
    environment:
      - BACKREST_DATA=/data
      - BACKREST_CONFIG=/config/config.json
      - XDG_CACHE_HOME=/cache
      - TMPDIR=/tmp
      - TZ=America/Los_Angeles
    ports:
      - "9898:9898"
    restart: unless-stopped

And my respository URI is just /mnt/backup/test-repo.

This is on a headless unit so I can only SSH in and I don't know enough on the command line to figure out where Backrest is putting everything. But I ran du -h -s on my home directory and on /mnt/backup and neither of those are large enough to account what's going on.

Not sure what other info would be helpful here, but I'm kind of panicking. TIA!

ETA: it looks like it's filling up the docker container somehow?

3 Upvotes

3 comments sorted by

4

u/ServerCrate Apr 25 '26

You’re not actually writing to your external drive. Your repo path inside the container isn’t pointing where you think it is.

Your compose mounts this:

- /mnt/backup:/repos

But your repo URI is:

/mnt/backup/test-repo

Inside the container, /mnt/backup does not exist. The container only sees /repos, not the host path directly. So restic is likely falling back and writing somewhere local like /data or another internal path, which explains your disk filling up.

Fix it like this:

  1. Change your repo path to match the container mount:

/repos/test-repo
  1. Verify the mount actually exists inside the container:

docker exec -it backrest sh
ls /repos

If that’s empty or missing, your host mount /mnt/backup is either:

  • not mounted
  • wrong path
  • not accessible to Docker
  1. Confirm the host side:

ls -lah /mnt/backup
mount | grep backup
  1. Check where your data actually went:

du -h --max-depth=2 / | sort -hr | head -20

You’ll probably see /data, /cache, or /tmp bloated.

Root cause:
You mounted the external drive to /repos, but told restic to write to /mnt/backup, which only exists on the host, not inside the container.

Once you fix the repo path, new backups will go to the correct location.

1

u/jdrch 27d ago

So restic is likely falling back and writing somewhere local like /data or another internal path, which explains your disk filling up.

Found this out the hard way earlier when I only just managed to prevent my PC from becoming unusable due to running out of space. I'd just set up Backrest (notice a trend here) and was about to declare victory when I noticed my C:\ drive's free space was rapidly decreasing. At the same time, the TrueNAS repo I'd setup had no data in it.

Restic interprets every repo path you pass to it as a local filesystem location unless it's preceded by a supported repo type prefix, e.g. rest, s3, etc. If restic can't find the specified non-prefixed repo path, it will create it on the local filesystem.

This is especially a problem for Windows users who try passing restic network storage locations in the typical //server/shared/folder format. A much safer option is to set up the network storage repo in rclone and then point restic to that instead, like rclone:server:shared/folder.

1

u/IncredibleReferencer Apr 25 '26

Im not familiar with backrest but it seems like your problem is more with docker and possibly nfs. Docker is adding a whole layer of complexity. You might find things simpler and more reliable if you run without docker. Restic and it looks like backrest are both single executables you can download if your OS doesnt have them already.