Change the default to encrypted segments rather than compressed with bzip2.
The default of the lbs program has not been changed; it is still necessary
to specify the correct options there to generate encrypted backups.
print STDERR "### Tempdir is $self->{TMPDIR}\n";
- $self->{EXTENSION} = ".bz2";
- $self->{FILTER} = "bzip2 -dc";
+ $self->{EXTENSION} = ".gpg";
+ $self->{FILTER} = "lbs-filter-gpg --decrypt";
$self->{CACHED} = [ ];
# Available commands:
# --list-snapshots
# --list-segments
+# --verify-snapshot <snapshot>
use strict;
use LBS qw(parse_headers);
+use Term::ReadPassword;
+
+sub get_password {
+ return if exists $ENV{LBS_GPG_PASSPHRASE};
+ $ENV{LBS_GPG_PASSPHRASE} = read_password('Passphrase: ');
+}
die "Too few arguments!\n" unless scalar(@ARGV) >= 2;
die "Must specify a repository!\n" unless -d $ARGV[0];
print $_, "\n";
}
} elsif ($cmd eq "--verify-snapshot") {
+ get_password();
+
my $snapshot = $store->load_snapshot($args[0]);
my %info = parse_headers($snapshot);
print "Root: $info{Root}\n";