diff luks-headers-backup.pl @ 17:69bf466ff2ae

get proj backup.
author Robert McIntyre <rlm@mit.edu>
date Sun, 19 May 2013 14:55:48 -0400
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/luks-headers-backup.pl	Sun May 19 14:55:48 2013 -0400
     1.3 @@ -0,0 +1,19 @@
     1.4 +#!/bin/perl
     1.5 +
     1.6 +
     1.7 +
     1.8 +sub backup {
     1.9 +    my $uuid = shift;
    1.10 +    my @command = 
    1.11 +	("cryptsetup", "luksHeaderBackup", "--header-backup-file", 
    1.12 +	 "./$uuid.luksHeader", "/dev/disk/by-uuid/$uuid");
    1.13 +    print("@command\n");
    1.14 +    system(@command);
    1.15 +}
    1.16 +
    1.17 +# TODO -- find all luks drives and do this automatically.
    1.18 +
    1.19 +&backup("fd14a1d5-ece0-43c4-a3c5-eb93af261cb5");
    1.20 +&backup("23d75d33-611b-424b-810a-099aef0bdd57");
    1.21 +&backup("8543575b-25cc-4132-88ef-39af98f646ae");
    1.22 +&backup("da9b2d38-bb64-459f-b1c8-480b790a2a50");