Restic version: restic 0.17.0 compiled with go1.22.5 on linux/amd64
Host: 6.10.5-arch1-1 (64-bit)
Hello, I’m trying to back up /mnt/volumes from docker which is located at /media/server/docker. I seem to have a permission problem, though. Is there a way to add sudo to the compose? I try starting it with sudo docker-compose up -d but it throws the same errors.
Docker compose:
#based on: https://www.youtube.com/watch?v=WBBTC5WfGis
#github here: https://github.com/JamesTurland/JimsGarage/blob/main/restic/docker-compose.yml
services:
backup:
image: mazzolino/restic
container_name: restic
hostname: archlinux
environment:
RUN_ON_STARTUP: "true" #change as you wish
BACKUP_CRON: "0 */12 * * *" #this is twice daily, i.e., every 12 hours
RESTIC_REPOSITORY: /restic
RESTIC_PASSWORD: snip
RESTIC_BACKUP_SOURCES: /mnt/volumes
RESTIC_COMPRESSION: auto
RESTIC_BACKUP_ARGS: >-
--tag restic-proxmox #add tags, whatever you need to mark backups
--verbose
RESTIC_FORGET_ARGS: >- #change as required
--keep-last 10
--keep-daily 7
--keep-weekly 5
--keep-monthly 12
TZ: America/Chicago
volumes:
- /media/8tb/restic:/restic #change the left hand side to where you want to store the backups.
- /media/8tb/restic/restore:/tmp-for-restore #USE THIS FOLDER FOR RESTORE - CAN VIEW EACH CONTAINER
- /media/server/docker:/mnt/volumes:ro
security_opt:
- no-new-privileges:true
restart: unless-stopped
prune:
image: mazzolino/restic
container_name: restic-prune
hostname: archlinux
environment:
RUN_ON_STARTUP: "true"
PRUNE_CRON: "0 0 4 * * *"
RESTIC_REPOSITORY: /restic
RESTIC_PASSWORD: snip
TZ: America/Chicago
security_opt:
- no-new-privileges:true
restart: unless-stopped
check:
image: mazzolino/restic
container_name: restic-check
hostname: archlinux
environment:
RUN_ON_STARTUP: "false"
CHECK_CRON: "0 15 5 * * *"
RESTIC_CHECK_ARGS: >-
--read-data-subset=10%
RESTIC_REPOSITORY: /restic
RESTIC_PASSWORD: snip
TZ: America/Chicago
security_opt:
- no-new-privileges:true
restart: unless-stopped
#commands
#to see snapshots: sudo docker exec restic restic snapshots
#to restore: sudo docker exec restric restic restore --target /temp-for-restore <snap name>
Much shorter example of repeating errors:
backups does not exist, skipping
using parent snapshot 46ffb58b
load index files
start scan on [/mnt/volumes]
start backup on [/mnt/volumes]
scan: lstat /mnt/volumes/overlay2/a8388be035e33083554b070f0bc68ba266d0d2c40e0c818fc42008ab0c6e3624/merged/proc/47/fdinfo/11: no such file or directory
error: failed to save /mnt/volumes/overlay2/a8388be035e33083554b070f0bc68ba266d0d2c40e0c818fc42008ab0c6e3624/merged/proc/1/task/1/attr/sockcreate: read /mnt/volumes/overlay2/a8388be035e33083554b070f0bc68ba266d0d2c40e0c818fc42008ab0c6e3624/merged/proc/1/task/1/attr/sockcreate: invalid argument
error: open /mnt/volumes/overlay2/a8388be035e33083554b070f0bc68ba266d0d2c40e0c818fc42008ab0c6e3624/merged/proc/1/task/1/mem: permission denied
For some reason the snapshots are HUGE too, 8+tb but there’s only about 100gb in there. If I try to restore it’s like setting off a zip bomb, and its in the /media/server/docker:/mnt/volumes location instead of the tmp-for-restore location here: /media/8tb/restic/restore:/tmp-for-restore
sudo docker exec restic restic snapshots
ID Time Host Tags Paths Size
-----------------------------------------------------------------------------------
b52001fa 2024-08-13 12:25:29 archlinux restic-proxmox /mnt/volumes 8.317 TiB
cf8b29a2 2024-08-13 15:59:16 archlinux restic-proxmox /mnt/volumes 8.619 TiB
28b7c575 2024-08-14 00:00:00 archlinux restic-proxmox /mnt/volumes 10.433 TiB
d7dcdc74 2024-08-20 00:00:00 archlinux restic-proxmox /mnt/volumes 10.247 TiB
e786138c 2024-08-20 12:00:00 archlinux restic-proxmox /mnt/volumes 11.067 TiB
0890975b 2024-08-21 00:00:00 archlinux restic-proxmox /mnt/volumes 12.129 TiB
46ffb58b 2024-08-21 12:00:00 archlinux restic-proxmox /mnt/volumes 11.695 TiB
-----------------------------------------------------------------------------------
Thanks in advance for your help!