From 716f682cf43919230649082f9a4fc26ce32e8c24 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 6 Oct 2020 17:43:07 -0700 Subject: linux: create service for backing up I want to backup my $HOME to the nas using restic. --- config/systemd/user/backup.service | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 config/systemd/user/backup.service (limited to 'config/systemd/user') diff --git a/config/systemd/user/backup.service b/config/systemd/user/backup.service new file mode 100644 index 0000000..a2f2d18 --- /dev/null +++ b/config/systemd/user/backup.service @@ -0,0 +1,13 @@ +[Unit] +Description=backup my home directory + +[Service] +Type=oneshot + +Environment=RESTIC_REPOSITORY=rest:http://nas:8010/ +Environment=RESTIC_PASSWORD_FILE=/home/fcuny/.config/restic/password + +ExecStart=/usr/bin/restic --tag=home --exclude=/home/fcuny/.cache --exclude=/home/fcuny/.mozilla --exclude=/home/fcuny/.config/chromium backup /home/fcuny + +[Install] +WantedBy=default.target -- cgit 1.4.1