Update 2024-02-14 07:51 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id
2024-02-14 07:54:31 +01:00
parent b55e6a3616
commit 9624895938
373 changed files with 19074 additions and 3045 deletions

20
.bin/OLD/restore Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
. $HOME/.bin/_config
print "Tarsnap Restore:"
if [ -z "$1" ]; then
doas tarsnap --list-archives | sort
printf "Usage: restore <key_id>\n"
exit 2
fi
_backup="$(doas tarsnap --list-archives | grep "$1")"
if [ -z "$_backup" ]; then
print "No backup with key id $1 found."
exit 1
fi
mkdir "restore_$1"
doas tarsnap --humanize-numbers -xvf "$_backup" -C "restore_$1"
print "Data restored in $(readlink -f "restore_$1")"