Backup: probe the target with a real write instead of access(W_OK)
On the server the backup folder is a Synology NFS share with "map all users to admin": access(W_OK) returns EACCES for uid 1000 although writes succeed, so the first scheduled run failed with "not usable". Create and remove a probe file instead; test that it leaves nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
086f6353f8
commit
f8f21ab42a
3 files changed
+18
-2
No files matched your search
+3
-1
@@ -14,7 +14,9 @@ holds it). Implementation: [`backup.js`](../backup.js); tests: `test/backup.test
|
||||
|
||||
The folder must already exist and be writable by uid 1000 (`create_host_path: false`:
|
||||
a missing folder makes `docker compose up` fail instead of silently creating an empty
|
||||
one on the wrong disk). Use another disk or a NAS share, never a folder inside `DATA`.
|
||||
one on the wrong disk). Use another disk or a NAS share, never a folder inside `DATA`. Writability is checked by
|
||||
creating and removing a probe file (`.circus-backup-probe-<pid>`), not with `access()`, which
|
||||
NFS shares with squashed ids (e.g. Synology "map all users to admin") answer wrongly.
|
||||
Without `BACKUP_PATH`, Compose still mounts the unused default `./backup`, so that
|
||||
folder must exist too (`node tools/prepare-compose.js` creates it). Upgrading an
|
||||
existing deployment therefore needs either `BACKUP_PATH` in `.env` or an empty
|
||||
|
||||
Reference in new issue
Block a user