From b68e7c002e64fd7893fd9a6d89c1d24567714fe9 Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Tue, 20 May 2025 15:27:30 +0200 Subject: [PATCH] Create config.yml --- config.yml | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 config.yml diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..4480c40 --- /dev/null +++ b/config.yml @@ -0,0 +1,110 @@ +defaults: + cron: '0 3 * * *' + envs: + - key: RESTIC_PASSWORD_FILE + value: '/secrets/.resticpwd' + - key: RCLONE_PCLOUD + value: 'pcloud:Server/Backups' + - key: BASE_REPOSITORY + value: 'rclone:${RCLONE_PCLOUD}' + - key: APPDATA_PATH + value: '/mnt/user/appdata' + - key: REPOSITORIES + value: 'directus forgejo hedgedoc media paperless godash synapse traefik vaultwarden rallly freshrss' + +jobs: + - name: Cleanup + cron: '0 5 * * 0' + envs: + - key: RESTIC_POLICY + value: '--keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 75' + - key: RESTIC_POLICY_SHORT + value: '--keep-last 7' + commands: + - command: for repo in ${REPOSITORIES}; do restic -r ${BASE_REPOSITORY}/$repo forget ${RESTIC_POLICY} --prune; done + - name: Unlock + cron: '0 4 * * 0' + commands: + - command: for repo in ${REPOSITORIES}; do restic -r ${BASE_REPOSITORY}/$repo unlock; done + - name: Directus + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/directus + commands: + - command: restic backup ${APPDATA_PATH}/directus + - name: Forgejo + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/forgejo + commands: + - command: docker exec -e PASSWORD=password forgejo-db pg_dump db --username=user > ${APPDATA_PATH}/forgejo/.dbBackup.sql + - command: chmod 600 ${APPDATA_PATH}/forgejo/.dbBackup.sql + - command: restic backup ${APPDATA_PATH}/forgejo + - name: Hedgedoc + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/hedgedoc + commands: + - command: restic backup ${APPDATA_PATH}/hedgedoc + - name: Media + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/media + commands: + - command: restic backup ${APPDATA_PATH}/media + - name: Paperless + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/paperless + commands: + - command: docker exec paperless document_exporter /usr/src/paperless/export 1> /dev/null 2> ${APPDATA_PATH}/paperless/.export.log + - command: restic backup ${APPDATA_PATH}/paperless + - name: GoDash + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/godash + commands: + - command: restic backup ${APPDATA_PATH}/godash + - name: Matrix + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/synapse + commands: + - command: docker exec -e PASSWORD=password matrix-db pg_dumpall --username=postgres > ${APPDATA_PATH}/synapse/.dbBackup.sql + - command: chmod 600 ${APPDATA_PATH}/synapse/.dbBackup.sql + - command: restic backup ${APPDATA_PATH}/synapse + - name: Traefik + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/traefik + commands: + - command: restic backup ${APPDATA_PATH}/traefik + - name: Vaultwarden + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/vaultwarden + commands: + - command: restic backup ${APPDATA_PATH}/vaultwarden + - name: Rallly + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/rallly + commands: + - command: docker exec -e PASSWORD=password rallly-db pg_dumpall --username=postgres > ${APPDATA_PATH}/rallly/.dbBackup.sql + - command: chmod 600 ${APPDATA_PATH}/rallly/.dbBackup.sql + - command: restic backup ${APPDATA_PATH}/rallly + - name: Freshrss + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/freshrss + commands: + - command: restic backup ${APPDATA_PATH}/freshrss + - name: Nextcloud + commands: + - command: rclone sync /mnt/user/nextcloud-backup ${RCLONE_PCLOUD}/nextcloud --multi-thread-streams=0 + - name: Portainer + envs: + - key: RESTIC_REPOSITORY + value: ${BASE_REPOSITORY}/portainer + commands: + - command: restic backup ${APPDATA_PATH}/portainer