sys handler creates LUKS header backup file once then fails
with backupninja 1.2.1 when the luksheaders
option is set to yes, the sys
handler attempts to create a header backup file. on the first run this succeeds, but then all future attempts fail:
Debug: /usr/sbin/cryptsetup will try to backup the LUKS header for device /dev/nvme0n1p3
Debug: /usr/sbin/cryptsetup luksHeaderBackup "/dev/nvme0n1p3" --header-backup-file "/var/backups/luksheader.nvme0n1p3.bin"
Debug: Requested header backup file /var/backups/luksheader.nvme0n1p3.bin already exists.
Fatal: The LUKS header of /dev/nvme0n1p3 could not be saved.
the other portions of the sys
handler simply overwrite existing output files. should the luksheaders
portion of the code simply remove the outputfile
prior to running cryptsetup
? i can provide a patch/MR if so
Edited by Andrew Bezella