CRYPTSETUP-LUKSHEADERBACKUP(8)
πΎ NAME πΎ
okay bestie, so cryptsetup-luksHeaderBackup β it stores a binary backup of the LUKS header and keyslot area. that's it, that's the whole vibe. it's from the cryptsetup manual (section 8, Maintenance Commands), and it's genuinely one of the most important things you can do before you start messing with a LUKS device. no cap. π
β¨ SYNOPSIS β¨
cryptsetup luksHeaderBackup --header-backup-file <file> [<options>] <device>
π¦ DESCRIPTION π¦
Stores a binary backup of the LUKS header and keyslot area.
Using '-' as a filename writes the header backup to a file named '-'. (yes literally a file called -. iconic, confusing, but exactly what it does. π)
The backup file and a passphrase valid at the time of backup allow decryption of the LUKS data area, even if the passphrase was later changed or removed from the LUKS device. Note that with a header backup, you lose the ability to wipe the LUKS device securely by just overwriting the header and keyslots. You must either securely erase all header backups or overwrite the encrypted data area.
bestie listen π β this is the whole reason this page matters. that backup file is a master key to your data. if someone gets it, they can decrypt even after you change or remove the passphrase. so you can't just shred the header on the disk and call it a day β you gotta nuke every single backup too, or overwrite the actual encrypted data area. periodt.
<options> can be [--header, --header-backup-file, --disable-locks].
π OPTIONS π
--batch-mode,-qβ suppresses all confirmation questions. use with care!
If the --verify-passphrase option is not specified, this option also switches off the passphrase verification.
--debugor--debug-jsonβ run in debug mode with full diagnostic logs. debug output lines are always prefixed by#.
If --debug-json is used, additional LUKS2 JSON data structures are printed.
--disable-locksβ disable lock protection for metadata on disk. this option is valid only for LUKS2 and is ignored for other formats.
WARNING: Do not use this option unless you run cryptsetup in a restricted environment where locking is impossible to perform (where /run directory cannot be used).
(fr fr, don't just vibe-check this one on. it's for weird locked-down environments only. π«)
--header <device or file storing the LUKS header>β use a detached (separated) metadata device or file where the LUKS header is stored. this option allows one to store the ciphertext and LUKS header on different devices.
For commands that change the LUKS header (e.g., luksAddKey), specify the device or file with the LUKS header directly as the LUKS device.
--header-backup-file fileβ specify a file with the header backup file. (yes this is the one you literally can't run the command without, so... π«Ά)--help,-?β show help text and default parameters.--usageβ show short option help.--version,-Vβ show the program version.
π REPORTING BUGS π
Report bugs at cryptsetup mailing list <cryptsetup@lists.linux.dev> or in Issues project section <https://gitlab.com/cryptsetup/cryptsetup/-/issues/new>.
Please attach the output of the failed command with --debug option added.
not me begging you to actually include the --debug output π the maintainers cannot help you if you just say "it broke". give them the receipts.
π SEE ALSO π
- Cryptsetup FAQ
<https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions> cryptsetup(8),integritysetup(8)andveritysetup(8)
π CRYPTSETUP π
Part of cryptsetup project <https://gitlab.com/cryptsetup/cryptsetup/>.
and that's the whole page bestie, you ate it π this manual page came to you courtesy of cryptsetup 2.8.8, dated 2026-09-07 β go back up your header, you main character π§β¨π
π¦ where this page comes from
- arch rolling: cryptsetup 2.8.8-1 Β· GPL-2.0-or-later
- fedora 44: cryptsetup 2.8.8-1.fc44 Β· GPL-2.0-or-later WITH cryptsetup-OpenSSL-exception AND LGPL-2.1-or-later WITH cryptsetup-OpenSSL-exception
- nixpkgs unstable: cryptsetup 2.8.8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms