1CRYPTSETUP-LUKSHEADERRESTORE(8M)aintenance CommandCsRYPTSETUP-LUKSHEADERRESTORE(8)
2
3
4
6 cryptsetup-luksHeaderRestore - restore a binary backup of the LUKS
7 header and keyslot area
8
10 cryptsetup luksHeaderRestore --header-backup-file <file> [<options>]
11 <device>
12
14 Restores a binary backup of the LUKS header and keyslot area from the
15 specified file.
16 NOTE: Using '-' as filename reads the header backup from a file named
17 '-'.
18
19 <options> can be [--header, --header-backup-file, --disable-locks].
20
21 WARNING: Header and keyslots will be replaced, only the passphrases
22 from the backup will work afterward.
23
24 This command requires that the volume key size and data offset of the
25 LUKS header already on the device and of the header backup match.
26 Alternatively, if there is no LUKS header on the device, the backup
27 will also be written to it.
28
30 --header <device or file storing the LUKS header>
31 Use a detached (separated) metadata device or file where the LUKS
32 header is stored. This option allows one to store ciphertext and
33 LUKS header on different devices.
34
35 For commands that change the LUKS header (e.g. luksAddKey), specify
36 the device or file with the LUKS header directly as the LUKS
37 device.
38
39 --header-backup-file <file>
40 Specify file with header backup file.
41
42 --disable-locks
43 Disable lock protection for metadata on disk. This option is valid
44 only for LUKS2 and ignored for other formats.
45
46 WARNING: Do not use this option unless you run cryptsetup in a
47 restricted environment where locking is impossible to perform
48 (where /run directory cannot be used).
49
50 --batch-mode, -q
51 Suppresses all confirmation questions. Use with care!
52
53 If the --verify-passphrase option is not specified, this option
54 also switches off the passphrase verification.
55
56 --debug or --debug-json
57 Run in debug mode with full diagnostic logs. Debug output lines are
58 always prefixed by #.
59
60 If --debug-json is used, additional LUKS2 JSON data structures are
61 printed.
62
63 --version, -V
64 Show the program version.
65
66 --usage
67 Show short option help.
68
69 --help, -?
70 Show help text and default parameters.
71
73 Report bugs at cryptsetup mailing list <cryptsetup@lists.linux.dev> or
74 in Issues project section
75 <https://gitlab.com/cryptsetup/cryptsetup/-/issues/new>.
76
77 Please attach output of the failed command with --debug option added.
78
80 Cryptsetup FAQ
81 <https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions>
82
83 cryptsetup(8), integritysetup(8) and veritysetup(8)
84
86 Part of cryptsetup project <https://gitlab.com/cryptsetup/cryptsetup/>.
87
88
89
90cryptsetup 2.5.0 2022-07-28 CRYPTSETUP-LUKSHEADERRESTORE(8)