diff --git a/restic/compose.yaml b/restic/compose.yaml index f5b4b16..2602b2b 100644 --- a/restic/compose.yaml +++ b/restic/compose.yaml @@ -7,10 +7,12 @@ services: volumes: # Backrest application data - backrest_data:/data - - backrest_config:/config - backrest_cache:/cache - backrest_tmp:/tmp + # Configuration file (mount directly to override) + - ./config.json:/config/config.json:rw + # Backup destination - ${RESTIC_BACKUP_PATH:-/mnt/hidrive/users/valknar/Backup}:/repos @@ -57,8 +59,6 @@ services: volumes: backrest_data: name: ${RESTIC_COMPOSE_PROJECT_NAME}_data - backrest_config: - name: ${RESTIC_COMPOSE_PROJECT_NAME}_config backrest_cache: name: ${RESTIC_COMPOSE_PROJECT_NAME}_cache backrest_tmp: diff --git a/restic/config.json b/restic/config.json new file mode 100644 index 0000000..9171f6f --- /dev/null +++ b/restic/config.json @@ -0,0 +1,199 @@ +{ + "version": 1, + "instance": "falcon", + "repos": [ + { + "id": "hidrive-backup", + "uri": "/repos", + "password": "falcon-backup-2025", + "autoUnlock": true, + "autoInitialize": true, + "prunePolicy": { + "schedule": { + "cron": "0 2 * * 0" + } + }, + "checkPolicy": { + "schedule": { + "cron": "0 3 * * 0" + } + } + } + ], + "plans": [ + { + "id": "postgres-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/core_postgres_data"], + "schedule": { + "cron": "0 2 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 6, + "yearly": 2 + } + } + }, + { + "id": "redis-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/core_redis_data"], + "schedule": { + "cron": "0 3 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 3 + } + } + }, + { + "id": "directus-uploads-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/directus_uploads"], + "schedule": { + "cron": "0 4 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 6, + "yearly": 2 + } + } + }, + { + "id": "directus-bundle-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/directus_bundle"], + "schedule": { + "cron": "0 4 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 3 + } + } + }, + { + "id": "awesome-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/awesome_data"], + "schedule": { + "cron": "0 5 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 6 + } + } + }, + { + "id": "gotify-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/gotify_data"], + "schedule": { + "cron": "0 5 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 3 + } + } + }, + { + "id": "scrapy-backup", + "repo": "hidrive-backup", + "paths": [ + "/volumes/scrapyd_data", + "/volumes/scrapy_code" + ], + "schedule": { + "cron": "0 6 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 3 + } + } + }, + { + "id": "n8n-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/n8n_data"], + "schedule": { + "cron": "0 6 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 6 + } + } + }, + { + "id": "filestash-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/filestash_data"], + "schedule": { + "cron": "0 7 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 3 + } + } + }, + { + "id": "linkwarden-backup", + "repo": "hidrive-backup", + "paths": [ + "/volumes/linkwarden_data", + "/volumes/linkwarden_meili_data" + ], + "schedule": { + "cron": "0 7 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 6 + } + } + }, + { + "id": "letsencrypt-backup", + "repo": "hidrive-backup", + "paths": ["/volumes/letsencrypt_data"], + "schedule": { + "cron": "0 8 * * *" + }, + "retention": { + "policyTimeBucketed": { + "daily": 7, + "weekly": 4, + "monthly": 12, + "yearly": 3 + } + } + } + ] +}