Use age encryption.

This commit is contained in:
CronyAkatsuki 2023-04-21 12:05:27 +02:00
parent d3d18bd893
commit 2a14077225

View File

@ -11,7 +11,8 @@ encrypt () {
x=$(date +%d.%m.%y) x=$(date +%d.%m.%y)
cd "$HOME/.local" cd "$HOME/.local"
tar cv -I"zstd -19 -T0" -f "$HOME/.local/cloud/backup-$x.tar.zst" "backup" tar cv -I"zstd -19 -T0" -f "$HOME/.local/cloud/backup-$x.tar.zst" "backup"
gpg -c --no-symkey-cache --cipher-algo AES256 -o "$HOME/.local/cloud/backup-$x.tar.zst.gpg" "$HOME/.local/cloud/backup-$x.tar.zst" read -p "Enter public key" pubKey
age -r $pubKey "$HOME/.local/cloud/backup-$x.tar.zst" > "$HOME/.local/cloud/backup-$x.tar.zst.age"
shred -uzn3 "$HOME/.local/cloud/backup-$x.tar.zst" shred -uzn3 "$HOME/.local/cloud/backup-$x.tar.zst"
} }