minus-squareUntouchedWagons@lemmy.catoLinux@lemmy.ml•Backup solution for docker volumeslinkfedilinkEnglisharrow-up2·edit-220 days agoI made my own solution since I wasn’t impressed by projects I had found. There’s two parts, the backup image and the restore image. I use it like so: services: restore_sabnzbd: image: untouchedwagons/simple-restore:1.0.5 container_name: restore_sabnzbd restart: no environment: - BACKUP_APPEND_DIRECTORY=/docker/production/sabnzbd - BACKUP_BASE_NAME=sabnzbd - FORCE_OWNERSHIP=1000:1000 volumes: - sabnzbd:/data - /mnt/tank/Media/Backups:/backups sabnzbd: image: ghcr.io/onedr0p/sabnzbd:4 container_name: sabnzbd restart: unless-stopped user: 1000:1000 volumes: - sabnzbd:/config - /mnt/tank/Media/Usenet:/mnt/data/Usenet depends_on: restore_sabnzbd: condition: service_completed_successfully networks: - traefik_default backup_sabnzbd: image: untouchedwagons/simple-backup:1.1.0 container_name: backup_sabnzbd restart: unless-stopped environment: TZ: "America/Toronto" BACKUP_APPEND_DIRECTORY: "/docker/production/sabnzbd" BACKUP_BASE_NAME: "sabnzbd" BACKUP_RETENTION: "24" BACKUP_FREQUENCY: "0 0 * * *" volumes: - sabnzbd:/data:ro - /mnt/tank/Media/Backups:/backups networks: traefik_default: external: true volumes: sabnzbd: The restore container looks for a file called RESTORED in /data and if one isn’t found it’ll try to restore the latest backup (if available) and then create a RESTORED file. The backup container ignores this file during backup. linkfedilink
I made my own solution since I wasn’t impressed by projects I had found. There’s two parts, the backup image and the restore image.
I use it like so:
services: restore_sabnzbd: image: untouchedwagons/simple-restore:1.0.5 container_name: restore_sabnzbd restart: no environment: - BACKUP_APPEND_DIRECTORY=/docker/production/sabnzbd - BACKUP_BASE_NAME=sabnzbd - FORCE_OWNERSHIP=1000:1000 volumes: - sabnzbd:/data - /mnt/tank/Media/Backups:/backups sabnzbd: image: ghcr.io/onedr0p/sabnzbd:4 container_name: sabnzbd restart: unless-stopped user: 1000:1000 volumes: - sabnzbd:/config - /mnt/tank/Media/Usenet:/mnt/data/Usenet depends_on: restore_sabnzbd: condition: service_completed_successfully networks: - traefik_default backup_sabnzbd: image: untouchedwagons/simple-backup:1.1.0 container_name: backup_sabnzbd restart: unless-stopped environment: TZ: "America/Toronto" BACKUP_APPEND_DIRECTORY: "/docker/production/sabnzbd" BACKUP_BASE_NAME: "sabnzbd" BACKUP_RETENTION: "24" BACKUP_FREQUENCY: "0 0 * * *" volumes: - sabnzbd:/data:ro - /mnt/tank/Media/Backups:/backups networks: traefik_default: external: true volumes: sabnzbd:
The restore container looks for a file called RESTORED in
/data
and if one isn’t found it’ll try to restore the latest backup (if available) and then create a RESTORED file. The backup container ignores this file during backup.