start readme. adapt to sanoid style snaps
This commit is contained in:
@ -10,13 +10,7 @@ use JSON;
|
||||
|
||||
$DEBUG = 1;
|
||||
|
||||
$BAK_BASE = '/.zfs/snapshot/';
|
||||
@BAK_VERSIONS = (
|
||||
'daily.0',
|
||||
'daily.1',
|
||||
'daily.2',
|
||||
'weekly.0'
|
||||
);
|
||||
@BAK_VERSIONS = glob qw( /.zfs/snapshot/autosnap* );
|
||||
|
||||
@SCRIPT_PATTERNS = ('.php$', '^.htaccess$', '.js$');
|
||||
|
||||
@ -26,9 +20,9 @@ if (@ARGV) {
|
||||
chomp(my $site = $ARGV[0]);
|
||||
my $real_site = abs_path($site);
|
||||
foreach my $bak_vers ( @BAK_VERSIONS ) {
|
||||
my $bak_site = $BAK_BASE . $bak_vers . $real_site;
|
||||
if ( -e $BAK_BASE . $bak_vers ) {
|
||||
my @bak_stat = stat($BAK_BASE . $bak_vers);
|
||||
my $bak_site = $bak_vers . $real_site;
|
||||
if ( -e $bak_vers ) {
|
||||
my @bak_stat = stat($bak_vers);
|
||||
my $bak_date = $bak_stat[9];
|
||||
$RESULTS{'data'}{$bak_date} = ();
|
||||
$RESULTS{'data'}{$bak_date}{'files'} = ();
|
||||
@ -88,7 +82,7 @@ if (@ARGV) {
|
||||
close(DIFF);
|
||||
}
|
||||
else {
|
||||
print STDERR ($BAK_BASE . $bak_vers . " does not exist\n");
|
||||
print STDERR ($bak_vers . " does not exist\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user