From fb2d44ea0795eb1bcfc2d90c204924de5f7c544d Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 25 Mar 2019 23:14:11 +0100 Subject: [PATCH] Add backup for desktop (external HDD) --- .config/systemd/backup.service.desk | 10 ++++++++++ .config/systemd/backup.timer.desk | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 .config/systemd/backup.service.desk create mode 100644 .config/systemd/backup.timer.desk diff --git a/.config/systemd/backup.service.desk b/.config/systemd/backup.service.desk new file mode 100644 index 0000000..57dd98c --- /dev/null +++ b/.config/systemd/backup.service.desk @@ -0,0 +1,10 @@ +[Unit] +Description=Back up chosty's documents +OnFailure=notify-backup-failure + +[Service] +Type=oneshot +# Cannot use -a as FAT32 does not support permission. Also don't use -g and -l (FAT32 does not support groups and symlinks) +# Do not use full path and relax timestamp, otherwise all files are copied over +ExecStart=/usr/bin/rsync /home/chosty -CRErtm --delete --modify-window=10 --exclude=.cache --exclude=.cfg --exclude=.eclipse --exclude=.electron-gyp --exclude=.npm --exclude=.nv --exclude=.pEp --exclude=.scenari --exclude=.swt --exclude=.local --exclude=.minecraft --exclude=.mozilla --exclude=.thumbnails --exclude=.oh-my-zsh --exclude=.var --exclude=.log /mnt/backup/Linux +#ExecStart=/usr/bin/rsync /mnt/data/Documents /mnt/data/Images /mnt/data/Vidéos -CErtm --delete --modify-window=10 /mnt/backup/Data/ diff --git a/.config/systemd/backup.timer.desk b/.config/systemd/backup.timer.desk new file mode 100644 index 0000000..c7929c2 --- /dev/null +++ b/.config/systemd/backup.timer.desk @@ -0,0 +1,9 @@ +[Unit] +Description=Run backup daily + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target