New backup 2025-11-09 16:45:01

This commit is contained in:
Penelope Gwen 2025-11-09 16:45:01 -08:00
parent 0ee18349d7
commit 1b688124de

View file

@ -114,10 +114,22 @@ tb-encrypt(){
printf 'no path provided\n' printf 'no path provided\n'
return 1 return 1
fi fi
tar -czf - "${1}" | openssl enc -e -aes256 -out secured.tar.gz path=$(realpath "${1}")
bn=$(basename "${path}")
tar -czf - "${1}" | openssl enc -e -pbkdf2 -out "${bn}-$(date +%Y-%m-%d_%H%M%S).tar.gz.enc"
} }
tb-decrypt(){ tb-decrypt(){
openssl enc -d -aes256 -in secured.tar.gz | tar xz -C test if ! [[ -f "${1}" ]];then
printf 'no path provided\n'
return 1
fi
path=$(realpath "${1}")
bn=$(basename "${path}")
echo "${1}"
echo "${path}"
echo "${bn}"
mkdir "${bn%%.*}"
openssl enc -d -pbkdf2 -in "${1}" | tar xz -C "${bn%%.*}"
} }
alias quickdeb='dpkg-buildpackage -b -tc' alias quickdeb='dpkg-buildpackage -b -tc'
alias gituntracked='git ls-files . --exclude-standard --others' alias gituntracked='git ls-files . --exclude-standard --others'