Restore Home Folder, full functionality

That’s the limited busybox tar version. You could install gnu-tar, but it’s not necessary.

I currently cannot edit the OP; here’s a better/compatible version of the first script:

#!/bin/sh

backupdir="/home"
outdir="$(grep -wo '/run/media/defaultuser/[^ ]*' /etc/mtab)"
[ -z "$outdir" ] && outdir="/home/defaultuser/Downloads"
[ -w "$outdir" ] || { echo "Cannot write to $outdir"; exit 1; }

outfile="$outdir/backup-$(date '+%Y%m%d%H%M').tar.gz"

echo "Will make a full backup of $backupdir, stored in $outdir"

devel-su tar -v -c -z -f "$outfile" "$backupdir"

echo "Backup saved as $outfile"

and a better version of the second script is in my previous post.

1 Like