convert from pgp to age

This commit is contained in:
tengel 2024-08-05 08:11:36 -05:00
parent 5ee2310cd5
commit 658047da39

View file

@ -1,6 +1,11 @@
#!/usr/bin/env bash
#
# ensure pinentry-tty is installed
# Create encrypted tarball and sync to remote
# requires: tar, gzip, age, rclone
# src: system/*, dst: bkp/*
# rclone target: preconfigured
#
# SPDX-License-Identifier: MIT
DTS=$(date "+%Y%m%d%H%M")
TGZ="bkp/syslocal-${DTS}.tgz"
@ -13,7 +18,7 @@ cd "${HOME}" || exit 1
echo "Creating ${TGZ} ..."
tar -czf "${TGZ}" system/*
echo "Encrypting ${TGZ} ..."
gpg -c "${TGZ}"
age -e -p -o "${TGZ}.age" "${TGZ}"
echo "Removing unencrypted ${TGZ} ..."
rm -v "${TGZ}"
echo "Syncing backups..."