From: Jakub Czajka Date: Wed, 29 Nov 2023 23:18:56 +0000 (+0100) Subject: Implement a backup service. X-Git-Url: https://git.ekhem.eu.org/?a=commitdiff_plain;h=e745242bacdb5721b76c6bad6e7c9c869ad003d9;p=cron.git Implement a backup service. --- diff --git a/backup.service b/backup.service new file mode 100644 index 0000000..a3adff8 --- /dev/null +++ b/backup.service @@ -0,0 +1,18 @@ +# Copyright (c) 2023 Jakub Czajka +# License: GPL-3.0 or later. + +[Unit] +Description=Backup files from the system. +OnFailure=notify_failure@%n.service + +[Service] +Type=oneshot +ExecStartPre=/usr/bin/git \ + --work-tree=/tmp \ + --git-dir=/srv/git/turnup.git \ + checkout main --force sources.yaml backup.yaml +ExecStart=/usr/bin/ansible-playbook /tmp/backup.yaml \ + --connection=local \ + --extra-vars token=/srv/prod/gdrive_proxy/token.json \ + --extra-vars key=/srv/prod/gdrive_proxy/private/storage_drive.key \ + --extra-vars sources=/tmp/sources.yaml