Update 2025-07-19 07:40 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id
2025-07-19 07:40:13 +02:00
parent 13bedaa7d3
commit 1a2d91b0d7
6 changed files with 30 additions and 21 deletions

View File

@@ -15,6 +15,24 @@ if [ -z "$_backup" ]; then
exit 1
fi
mkdir "restore_$1"
doas tarsnap --humanize-numbers -xvf "$_backup" -C "restore_$1"
print "Data restored in $(readlink -f "restore_$1")"
print "Found Backup: $_backup"
mkdir -p "restore_$1"
print "Extracting to: $(readlink -f $PWD/restore_$1)"
if [ -f "restore_$1/.done" ]
then
print "Skipping, because restore_$1/.done file exists."
else
doas tarsnap -tf "$_backup" \
| xargs -P 20 -n 20 -t \
doas tarsnap --humanize-numbers --resume-extract --chroot -xf "$_backup" -C "restore_$1" --
if [ $? -eq 0 ]
then
print "Data restored in $(readlink -f "restore_$1")"
touch "restore_$1/.done"
else
print "Restore aborted..."
fi
fi
print ""