-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathborg-backup-dotfiles.service
35 lines (32 loc) · 1.07 KB
/
borg-backup-dotfiles.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[Unit]
Description=Automated Borg Backup: dotfiles
[Service]
Type=oneshot
Environment=HOST=k-2so
Environment=USER=alex
Environment=REPO=dotfiles
ExecStart=/bin/borg create \
--stat --compression zlib \
/home/${USER}/Backup/borg/${HOST}-${USER}-${REPO}::{now} \
/home/${USER}/.Xauthority \
/home/${USER}/.Xresources \
/home/${USER}/.emacs \
/home/${USER}/.gdbinit \
/home/${USER}/.git \
/home/${USER}/.gitconfig \
/home/${USER}/.gnupg \
/home/${USER}/.ssh \
/home/${USER}/.vnc \
/home/${USER}/.pam_environment \
/home/${USER}/.zprofile \
/home/${USER}/.zshrc.local
ExecStart=/bin/borg check \
--verbose \
/home/${USER}/Backup/borg/${HOST}-${USER}-${REPO}
ExecStart=/bin/borg prune \
--verbose \
--keep-within 3d \
--keep-daily 30 \
--keep-monthly 11 \
--keep-yearly 5 \
/home/${USER}/Backup/borg/${HOST}-${USER}-${REPO}