Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
89 lines (80 loc) · 5.45 KB
/
Copy pathcompose.yaml
File metadata and controls
89 lines (80 loc) · 5.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
archiver:
container_name: archiver
image: forgejo.bryantserver.com/sisyphusmd/archiver:0.11.1
restart: unless-stopped
stop_grace_period: 2m # Allow time for graceful shutdown and cleanup
hostname: backup-server # forms the Duplicacy snapshot ID (<hostname>-<service>); keep it stable
cap_drop:
- ALL
cap_add:
- DAC_OVERRIDE # Backup + restore: read/write data owned by other UIDs
# CHOWN + FOWNER are ONLY needed to restore with original ownership. A backup-only
# deployment can drop both; a restore without them logs a warning and lands files owned
# by root (or run the restore with IGNORE_OWNERSHIP=1).
- CHOWN # Restore: recreate files under their original owner
- FOWNER # Restore: set mode/timestamps on files owned by other UIDs
# - SYS_ADMIN # Only for a hook that takes btrfs snapshots (docs/installation.md)
security_opt:
- no-new-privileges:true
# ports:
# - "9469:9469" # only with METRICS_PORT; logs/archiver.prom needs no port
# - "127.0.0.1:8470:8470" # only with WEB_PORT; bound to localhost for a proxy on this host
environment:
BACKUP_SCHEDULE: "0 3 * * *" # backup pipeline: daily at 3am (omit for manual mode)
MAINTENANCE_SCHEDULE: "0 13 * * *" # check + prune: daily at 1pm, opposite the backup window
# RESTORE_DRILL_SCHEDULE: "0 5 * * 0" # weekly restore drill (docs/maintenance.md)
# METRICS_PORT: "9469" # serve Prometheus /metrics (docs/monitoring.md); publish it under ports: below
# WEB_PORT: "8470" # read-only status page (docs/monitoring.md); no login: behind an authenticating proxy
TZ: "America/New_York" # Timezone for scheduled backups and timestamps (default: UTC)
# SYSTEMCTL_FORCE_BUS: "1" # Enable systemctl access to host (requires socket mounts)
# Non-secret settings, exactly as emitted by 'archiver init'.
# The file holds no secrets, so it can be committed to git alongside this compose file.
# (Values can also be inlined under environment: above — same effect.)
env_file:
- ./archiver.env
secrets: # each secret is one file mounted at /run/secrets/<name>
- storage_password # >= 8 characters (Duplicacy requirement)
- rsa_passphrase
- rsa_private_key # RSA keypair required in env-native mode
- rsa_public_key
- recovery_password # automatic recovery kit on every storage target (README
# "Automatic Recovery Kit"); 'init' generates it — keep a
# copy in your password manager
# - ssh_private_key # only for sftp targets
# - ssh_public_key # only for sftp targets (restore needs both halves)
# - storage_target_1_b2_id # only for b2 targets
# - storage_target_1_b2_key
# - storage_target_1_s3_id # only for s3 targets
# - storage_target_1_s3_secret
# - storage_target_1_breakglass_b2_id # optional read-only key for the break-glass
# - storage_target_1_breakglass_b2_key # envelope (docs/recovery.md)
volumes:
- ./archiver-logs:/opt/archiver/logs # Persistent logs (optional)
- /path/to/host/backup-dir:/mnt/backup-dir # Data to backup (must match SERVICE_DIRECTORIES)
- /path/to/host/backup/storage:/mnt/backup/storage # Local storage target
# This compose file itself, captured verbatim into the recovery kit so a recovered
# deployment starts from your real manifest, not a reconstruction:
- ./compose.yaml:/opt/archiver/deployment/compose.yaml:ro
# - /var/run/docker.sock:/var/run/docker.sock # Docker socket for scripts (optional)
# - /run/podman/podman.sock:/var/run/docker.sock # Podman socket (mount as docker.sock)
# - /run/dbus/system_bus_socket:/run/dbus/system_bus_socket # systemctl start/stop/status
# - /etc/systemd/system:/etc/systemd/system # systemctl mask/unmask/enable/disable
# - /path/to/host/restore-dir:/mnt/restore-dir # Restore location (will be prompted)
# - ./archiver-hooks:/opt/archiver/hooks:ro # HOOKS_DIR: hooks outside the data (docs/hooks.md)
# Secrets for the env-native service above. Files can come straight from 'archiver init'
# (env-native/secrets/); move them somewhere safe and reference them here.
secrets:
storage_password: { file: ./secrets/storage_password }
rsa_passphrase: { file: ./secrets/rsa_passphrase }
rsa_private_key: { file: ./secrets/rsa_private_key }
rsa_public_key: { file: ./secrets/rsa_public_key }
recovery_password: { file: ./secrets/recovery_password }
# ssh_private_key: { file: ./secrets/ssh_private_key } # only for sftp targets
# ssh_public_key: { file: ./secrets/ssh_public_key } # only for sftp targets
# storage_target_1_b2_id: { file: ./secrets/storage_target_1_b2_id }
# storage_target_1_b2_key: { file: ./secrets/storage_target_1_b2_key }
# storage_target_1_s3_id: { file: ./secrets/storage_target_1_s3_id }
# storage_target_1_s3_secret: { file: ./secrets/storage_target_1_s3_secret }
# storage_target_1_breakglass_b2_id: { file: ./secrets/storage_target_1_breakglass_b2_id }
# storage_target_1_breakglass_b2_key: { file: ./secrets/storage_target_1_breakglass_b2_key }