Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
13
.bin/tarsnap-backup
Executable file
13
.bin/tarsnap-backup
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
. $HOME/.bin/_config
|
||||
|
||||
[ -d "$1" ] || ( printf "Usage: backup <target>\n" && exit 2; )
|
||||
|
||||
print "Tarsnap Backup:"
|
||||
|
||||
_target=$(readlink -f "$1")
|
||||
_key=$(pwgen -n1 8)
|
||||
_date=$(date "+%Y-%m-%d %H:%M")
|
||||
_host=$(uname -n)
|
||||
|
||||
doas tarsnap --humanize-numbers --checkpoint-bytes 52428800 --exclude "*/.git/*" -cvf "$_host: $_target $_date ($_key)" "$_target"
|
||||
Reference in New Issue
Block a user