Update 2025-07-16 09:55 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id
2025-07-16 09:55:17 +02:00
parent 9f365fe933
commit 3b839841ac
6 changed files with 21 additions and 53 deletions

View File

@@ -1,20 +0,0 @@
#!/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")"

View File

@@ -1,21 +0,0 @@
#!/bin/sh
. $HOME/.bin/_config
print "Tarsnap Delete:"
if [ -z "$1" ]; then
doas tarsnap --list-archives | sort
printf "Usage: delete <key_id>\n"
exit 2
fi
_delete="$(doas tarsnap --list-archives | grep "$1")"
if [ -z "$_delete" ]; then
print "No backup with key id $1 found."
exit 1
fi
print "Deleting: $_delete"
doas tarsnap -df "$_delete"
print "done."