~jagtalon/dotfiles

ref: 5c70bb9cd63d579bdac548545c09dbb66bdcf02f dotfiles/.local/bin/tarsnap-backup.sh -rwxr-xr-x 476 bytes
5c70bb9cJag Talon Adapt Tarsnap on OpenBSD 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env fish

# List directories to be backed up.
set directories "/etc/httpd.conf" "/etc/acme-client.conf" "/var/www/htdocs/"

# Prune unnecessary files.
# /usr/local/bin/tarsnap --list-archives | /usr/local/bin/prunef --keep-hourly 20 --keep-daily 10 --keep-weekly 8 --keep-monthly 12 "Jag-%Y-%m-%d_%H-%M-%S" | xargs --no-run-if-empty -n1 /usr/bin/tarsnap -df

# Start backup.
/usr/local/bin/tarsnap -v -c -f (uname -n)"-"(date +%Y-%m-%d_%H-%M-%S) \
    $directories