/[sysadmin-cookbook]/recepies/zfs/zfs-expire-snapshot.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/zfs/zfs-expire-snapshot.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 117 by dpavlin, Thu Jun 25 11:07:26 2009 UTC revision 118 by dpavlin, Thu Jul 9 10:14:40 2009 UTC
# Line 10  my $debug = 0; Line 10  my $debug = 0;
10    
11  my $config = {  my $config = {
12          'default' => {          'default' => {
13                  14 => 5,                  21 => 5,
14                  30 => 10,                  30 => 10,
15                  60 => 30,                  60 => 30,
16          },          },
17          '212052' => {   # koha-dev          '212052' => {   # koha-dev
18                  7 => 10,                  7 => 10,
19                    14 => 30,
20          },          },
21          '212056' => {   # webpac2          '212056' => {   # webpac2
22                  7 => 5,                  7 => 5,
# Line 56  while(<$fs>) { Line 57  while(<$fs>) {
57    
58          my $keep_every_days;          my $keep_every_days;
59          my $older_than_days;          my $older_than_days;
60          foreach ( keys %$c ) {          foreach ( sort keys %$c ) {
61                  $older_than_days = $_;                  $older_than_days = $_;
62                  $keep_every_days = $c->{$_};                  $keep_every_days = $c->{$_};
63                  warn "## $host $age > $older_than_days" if $debug;                  warn "## $host $age > $older_than_days" if $debug;

Legend:
Removed from v.117  
changed lines
  Added in v.118

  ViewVC Help
Powered by ViewVC 1.1.26