Use age encryption.
This commit is contained in:
parent
d3d18bd893
commit
2a14077225
3
backuper
3
backuper
@ -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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user