diff options
author | Mike Crute <mike@crute.us> | 2021-07-28 22:42:10 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2021-07-28 22:42:10 -0700 |
commit | 21a8cd5be238acd20b6196674d27d830f879fd0f (patch) | |
tree | a636df0f391da6c840f1959d491e17a253d2e684 /.linux | |
parent | 16f6d73fde01c02a5a4bfd5c0e65b9933bb571c5 (diff) | |
download | dotfiles-21a8cd5be238acd20b6196674d27d830f879fd0f.tar.bz2 dotfiles-21a8cd5be238acd20b6196674d27d830f879fd0f.tar.xz dotfiles-21a8cd5be238acd20b6196674d27d830f879fd0f.zip |
Backup music with systemd
Diffstat (limited to '.linux')
-rw-r--r-- | .linux/systemd/music-backup.service | 12 | ||||
-rw-r--r-- | .linux/systemd/music-backup.timer | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/.linux/systemd/music-backup.service b/.linux/systemd/music-backup.service new file mode 100644 index 0000000..7a83c15 --- /dev/null +++ b/.linux/systemd/music-backup.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=backup music with rsync | ||
3 | |||
4 | [Service] | ||
5 | Type=oneshot | ||
6 | |||
7 | ExecCondition=ping -q -c1 -W1 -w1 nas.sea1.crute.me | ||
8 | |||
9 | ExecStart=rsync -rltvp -e "ssh -i /home/mcrute/.ssh/id_rsa.musicbackup -l mcrute" --delete-excluded --delete-during --exclude '/Swinsian/Artwork/' /home/mcrute/Music/Swinsian nas.sea1.crute.me:/mnt/data/Mike/Music/ | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=timers.target | ||
diff --git a/.linux/systemd/music-backup.timer b/.linux/systemd/music-backup.timer new file mode 100644 index 0000000..fdf7e13 --- /dev/null +++ b/.linux/systemd/music-backup.timer | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=Run music backup with rsync daily | ||
3 | |||
4 | [Timer] | ||
5 | OnCalendar=*-*-* 00:00:00 | ||
6 | AccuracySec=8h | ||
7 | RandomizedDelaySec=15m | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=default.target | ||