barman
This is an old revision of the document!
Table of Contents
Barman
Barman encryption
Generate pgp keys for the encryption
# create 32 char password for pgp date +%s | sha256sum | base64 | head -c 32 ;echo # # 1 save the output in /etc/barman.d/secret # 2 make sure that permissions for the secret is root.barman-owner and 440 # 3 and use it for input in the next step and i in the barman server.conf # # create pgp entry gpg --full-generate-key # When asked: give a name like: barman and the password from previous command
In the /etc/barman.d/server.conf insert
backup_compression_format = tar backup_compression = gzip encryption = gpg encryption_key_id = barman encryption_passphrase_command = "cat /etc/barman.d/secret"
Done
You will have to re-initiate the backup, ie (be careful and not just c&p, but think):
sudo barman cron sudo -u barman barman receive-wal --create-slot SERVER-NAME sudo -u barman barman switch-xlog SERVER-NAME sudo -u barman barman backup SERVER-NAME
If create-slot fails, you will have to –drop-slot or drop the slot from the database.
You can see that the encryption is on:
sudo -u barman barman check SERVER-NAME | grep encryption # and in your barman-backup-dir/SERVER-NAME/base/BACKUP-SET/ will have a basebackup ending on :gpg # and in your barman-backup-dir/SERVER-NAME/wals/WAL-SET/ the wal file will respond to # file wal-file # wal-file: PGP RSA encrypted session key - keyid: 43F52AD6 99DF306B RSA (Encrypt or Sign) 3072b
barman.1761567717.txt.gz · Last modified: 2025/10/27 13:21 by jbi
