Created
February 18, 2024 11:11
-
-
Save 1player/9ddf1b7993395fae87221a01e5c3505f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ansible managed | |
[Unit] | |
After=network-online.target | |
[Container] | |
ContainerName=backup | |
Image=docker.io/mazzolino/restic | |
HostName=xxx | |
Environment="RUN_ON_STARTUP=true" | |
Environment="RESTIC_REPOSITORY=sftp:[email protected]:restic-xxx/" | |
Environment="RESTIC_BACKUP_ARGS=--files-from=/backup/backup.include" | |
Environment="RESTIC_FORGET_ARGS=--prune --keep-last 7 --keep-daily 7 --keep-weekly 4 --keep-monthly 3 --keep-yearly 1 --keep-tag keep --host xxx" | |
Environment="BACKUP_CRON=0 30 4 * * *" | |
Environment="RESTIC_CHECK_ARGS=--read-data-subset 10%" | |
Environment="POST_COMMANDS_SUCCESS=curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/xxx" | |
Secret=backup-restic-password,type=env,target=RESTIC_PASSWORD | |
Volume=/etc/backup.include:/backup/backup.include | |
Volume=/etc:/backup/etc | |
Volume=/srv:/backup/srv | |
Volume=backup-ssh.volume:/run/secrets/.ssh:ro | |
[Install] | |
WantedBy=multi-user.target default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment