diff options
Diffstat (limited to 'luks-header-backup')
-rwxr-xr-x | luks-header-backup | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/luks-header-backup b/luks-header-backup new file mode 100755 index 0000000..4219df7 --- /dev/null +++ b/luks-header-backup @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +host=${HOST:-$HOSTNAME} +test -n "$host" + +dev=$1 +dev_basename=${dev##*/} + +test -n "$dev_basename" + +cryptsetup --header-backup-file=$HOME/$host-${dev_basename}-luks-header.bak luksHeaderBackup $dev |