-
Notifications
You must be signed in to change notification settings - Fork 80
Description
I have two working backups using these docker containers. One fully working backup to Backblaze using S3 buckets and one partially working that backs up the same data to an external direct attached storage NAS.
The containers are both running on the same QNAP NAS.
When I say fully working above I mean that all three containers / container functions (backup, prune, and check) are starting and working without error. The partially working scenario is backing up without issue but both the prune and check containers are having issues finding the repository config file.
Here is what the functioning backup logs to the external direct attached NAS look like:
Checking configured repository '/mnt/external/restic' ...
Repository found.
Executing backup on startup ...
Starting Backup at 2024-07-13 17:27:17
open repository
lock repository
using parent snapshot 5c9a1ce2
load index files
start scan on [/mnt/restic]
start backup on [/mnt/restic]
scan finished in 36.511s: 251343 files, 2.964 TiB
Files: 0 new, 2 changed, 251341 unmodified
Dirs: 0 new, 13 changed, 23196 unmodified
Data Blobs: 2 new
Tree Blobs: 13 new
Added to the repository: 11.877 MiB (5.870 MiB stored)
processed 251343 files, 2.964 TiB in 1:56
snapshot de015c2c saved
Backup successful
Finished backup at 2024-07-13 17:29:14 after 117 seconds
Scheduling backup job according to cron expression.
new cron: 0 30 7 * * *
This log, and the resulting backup, appears to clearly show that the repository (and therefor the config file) has been found.
Here is what the logs look like for the check container:
Checking configured repository '/mnt/external/restic' ...
Fatal: unable to open config file: stat /mnt/external/restic/config: no such file or directory
Is there a repository at the following location?
/mnt/external/restic
Could not access the configured repository.
Not trying to initialize because SKIP_INIT is set in your configuration..
Scheduling check job according to cron expression.
new cron: 0 15 9 * * *
Here is what the logs look like for the prune container:
Checking configured repository '/mnt/external/restic' ...
Fatal: unable to open config file: stat /mnt/external/restic/config: no such file or directory
Is there a repository at the following location?
/mnt/external/restic
Could not access the configured repository.
Not trying to initialize because SKIP_INIT is set in your configuration..
Scheduling prune job according to cron expression.
new cron: 0 0 8 * * *
Yet I can run both the check and prune jobs successfully, manually, from the command line.
Running the check job manually:
docker compose run --rm backup check
Running the prune job manually:
docker compose run --rm backup prune
Here is a screenshot showing the config file that cannot be found:
My docker compose file looks like this:
[rstrom@NASF8629F external-docker-backup]$ cat docker-compose.yaml
version: "3.3"
services:
backup:
image: mazzolino/restic
hostname: restic-docker-backup-external
# restart: unless-stopped
restart: always
environment:
RUN_ON_STARTUP: "true"
BACKUP_CRON: "0 30 7 * * *"
RESTIC_REPOSITORY: /mnt/external/restic
RESTIC_PASSWORD: <redacted>
RESTIC_BACKUP_SOURCES: /mnt/restic
RESTIC_BACKUP_ARGS: >-
--tag qnap-rstrom-home-drive
--exclude *.tmp
--verbose
TZ: America/Los_Angeles
volumes:
- /share/CACHEDEV1_DATA/homes/rstrom:/mnt/restic
- /share/TerraMaster/qnaprestic:/mnt/external
prune:
image: mazzolino/restic
hostname: restic-docker-prune-external
restart: unless-stopped
environment:
SKIP_INIT: "true"
RUN_ON_STARTUP: "false"
PRUNE_CRON: "0 0 8 * * *"
RESTIC_PRUNE_ARGS: >-
--verbose
RESTIC_REPOSITORY: /mnt/external/restic
RESTIC_PASSWORD: <redacted>
TZ: America/Los_Angeles
check:
image: mazzolino/restic
hostname: restic-docker-check-external
restart: unless-stopped
environment:
SKIP_INIT: "true"
RUN_ON_STARTUP: "false"
CHECK_CRON: "0 15 9 * * *"
RESTIC_CHECK_ARGS: >-
--read-data-subset=10%
--verbose
RESTIC_REPOSITORY: /mnt/external/restic
RESTIC_PASSWORD: <redacted>
TZ: America/Los_Angeles
[rstrom@NASF8629F external-docker-backup]$
This job was created by copying the known working Backblaze docker-compose.yaml file and then modifying it to point to the external direct attached storage. The backup to the external storage works fine. I have tested mounting the backup on the external storage and navigating the backup file structure. It is only the prune and check portions of this that are not working.
I have been over the docker-compose.yaml file many, many times and I cannot find anything wrong with it.
Can someone, anyone, please tell me if there is something wrong with my configuration or if there is some bug that is causing this issue?
Thanks!
