You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -471,6 +471,7 @@ services:
471
471
backitup:
472
472
image: ghcr.io/climactic/backitup:latest
473
473
command: start
474
+
user: root # Required for reading files with restrictive permissions
474
475
volumes:
475
476
- ./config:/config # Config + database
476
477
- ./data:/data:ro # Source files (read-only)
@@ -482,6 +483,53 @@ services:
482
483
restart: unless-stopped
483
484
```
484
485
486
+
### File Permissions
487
+
488
+
The Docker image runs as a non-root user (UID 1000) by default. If you're backing up files with restrictive permissions (e.g., SSH keys, database files), you have two options:
489
+
490
+
> **Tip:** Always mount source data directories as read-only (`:ro`) to prevent accidental modifications during backup.
491
+
492
+
**Option 1: Run as root (simplest)**
493
+
494
+
```yaml
495
+
services:
496
+
backitup:
497
+
image: ghcr.io/climactic/backitup:latest
498
+
user: root
499
+
# ...
500
+
```
501
+
502
+
**Option 2: Match the host user**
503
+
504
+
If your files are owned by a specific user, run the container as that user:
505
+
506
+
```yaml
507
+
services:
508
+
backitup:
509
+
image: ghcr.io/climactic/backitup:latest
510
+
user: "1000:1000" # Match the UID:GID of file owner
511
+
# ...
512
+
```
513
+
514
+
### One-time vs Scheduled Backups
515
+
516
+
Use `command: start` for the long-running scheduler daemon with `restart: unless-stopped`.
517
+
518
+
For one-time backups (e.g., triggered by cron or CI), use `restart: on-failure` to prevent the container from restarting indefinitely after a successful backup:
519
+
520
+
```yaml
521
+
services:
522
+
backitup:
523
+
image: ghcr.io/climactic/backitup:latest
524
+
command: backup -s manual
525
+
user: root
526
+
volumes:
527
+
- ./config:/config
528
+
- ./data:/data:ro
529
+
- ./backups:/backups
530
+
restart: on-failure # Don't restart after successful backup
Copy file name to clipboardExpand all lines: docs/configuration.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,11 +151,43 @@ Named backup sources. Each source defines files to include in backups.
151
151
|`path`| string | Yes | Base directory path |
152
152
|`patterns`| string[]| No | Glob patterns (default: `["**/*"]`) |
153
153
154
-
**Glob Pattern Examples:**
154
+
**Glob Pattern Syntax:**
155
155
156
-
-`**/*.ts` - All TypeScript files
157
-
-`!**/node_modules/**` - Exclude node_modules
158
-
-`src/**` - Everything in src directory
156
+
Patterns use glob syntax to include or exclude files. Patterns starting with `!` are exclusions.
157
+
158
+
**Important:** Patterns are matched relative to the source `path`, not as absolute paths. If your source path is `/data`, a file at `/data/logs/app.log` would be matched against `logs/app.log`.
0 commit comments