Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for encryption of dar archives #114

Open
mbrandis opened this issue Jul 3, 2018 · 1 comment
Open

Support for encryption of dar archives #114

mbrandis opened this issue Jul 3, 2018 · 1 comment

Comments

@mbrandis
Copy link

mbrandis commented Jul 3, 2018

Hi!

Could you please add the encryption of dar archives with public keys? This would be a really helpful feature for the future!

Thanks in advance!

Cheers,
Mark

@appshbrockmann
Copy link

I write my gpg files to a subfolder (called gpg) with the following script (automated in BM_POST_BACKUP_COMMAND):

#!/bin/bash

if [ ! -e /etc/backup-manager.conf ]; then
echo "ERROR: Backup Manager is not present on your system."
exit 1
fi

if [ ! -e /etc/backup-manager/gpg-copy.conf ]; then
echo "ERROR: unable to find gpg-copy.conf configuration file in /etc/backup-manager/."
exit 1
fi

source /etc/backup-manager.conf
source /etc/backup-manager/gpg-copy.conf

for DATEI in $(find ${BM_REPOSITORY_ROOT}/ -newer ${BM_REPOSITORY_ROOT}/gpgtransfer.ref -type f | tac); do
/usr/bin/gpg -o ${DATEI}.gpg -r ${BM_ENCRYPTION_RECIPIENT} -e ${DATEI};
mv ${DATEI}.gpg ${GPG_COPY_FOLDERS}
/bin/chmod 0666 ${GPG_COPY_FOLDERS}/$(/usr/bin/basename ${DATEI}.gpg)
done

touch ${BM_REPOSITORY_ROOT}/gpgtransfer.ref

exit 0

the file gpgtransfer.ref is just empty, only there for the last edit time, the file gpg-copy.conf looks like:
export GPG_COPY_FOLDERS="whateverFolderYouLike"

This script will however never delete anything nor integrate with other features of backup-manager (ftp, scp etc.). Use at your own risk.

Good Bye
Hermann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants