diff --git a/systemd/copy-grimdawn-save.service b/systemd/copy-grimdawn-save.service new file mode 100644 index 0000000..6d7f082 --- /dev/null +++ b/systemd/copy-grimdawn-save.service @@ -0,0 +1,10 @@ +[Unit] +Description=Copy Grim Dawn (the game) save for backup + +[Service] +Type=oneshot +Environment=GAME_PATH=%h"/games/gog/grim-dawn/drive_c/users/steamuser/Documents/My Games/Grim Dawn/" +Environment=BACKUP_PATH=%h"/nextcloud/Games/Backups/Grim Dawn/" +Environment="PASSPHRASE=a" +ExecStart=duplicity backup --full-if-older-than 5D ${GAME_PATH} file://${BACKUP_PATH} +ExecStart=duplicity remove-older-than 15D --force file://${BACKUP_PATH} diff --git a/systemd/copy-grimdawn-save.timer b/systemd/copy-grimdawn-save.timer new file mode 100644 index 0000000..df0318e --- /dev/null +++ b/systemd/copy-grimdawn-save.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Copy Grim Dawn (the game) save for backup timer + +[Timer] +OnCalendar=daily +AccuracySec=10m +OnStartupSec=5m +Persistent=yes + +[Install] +WantedBy=default.target