changeset 17:69bf466ff2ae

get proj backup.
author Robert McIntyre <rlm@mit.edu>
date Sun, 19 May 2013 14:55:48 -0400
parents cfb8a8c044b4
children 413c2abaaf76
files backup-proj.sh luks-headers-backup.pl
diffstat 2 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/backup-proj.sh	Sun May 19 14:55:48 2013 -0400
     1.3 @@ -0,0 +1,3 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +rsync -avz /home/r/proj /mnt/backup/proj-backup-$(date +"%F-%H:%M")
     1.7 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/luks-headers-backup.pl	Sun May 19 14:55:48 2013 -0400
     2.3 @@ -0,0 +1,19 @@
     2.4 +#!/bin/perl
     2.5 +
     2.6 +
     2.7 +
     2.8 +sub backup {
     2.9 +    my $uuid = shift;
    2.10 +    my @command = 
    2.11 +	("cryptsetup", "luksHeaderBackup", "--header-backup-file", 
    2.12 +	 "./$uuid.luksHeader", "/dev/disk/by-uuid/$uuid");
    2.13 +    print("@command\n");
    2.14 +    system(@command);
    2.15 +}
    2.16 +
    2.17 +# TODO -- find all luks drives and do this automatically.
    2.18 +
    2.19 +&backup("fd14a1d5-ece0-43c4-a3c5-eb93af261cb5");
    2.20 +&backup("23d75d33-611b-424b-810a-099aef0bdd57");
    2.21 +&backup("8543575b-25cc-4132-88ef-39af98f646ae");
    2.22 +&backup("da9b2d38-bb64-459f-b1c8-480b790a2a50");