/[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 118 by dpavlin, Thu Jul 9 10:14:40 2009 UTC revision 219 by dpavlin, Sun Jun 27 21:55:33 2010 UTC
# Line 12  my $config = { Line 12  my $config = {
12          'default' => {          'default' => {
13                  21 => 5,                  21 => 5,
14                  30 => 10,                  30 => 10,
15                  60 => 30,                  90 => 30,
16          },          },
17          '212052' => {   # koha-dev          '212052' => {   # koha-dev
18                  7 => 10,                  7 => 10,
# Line 20  my $config = { Line 20  my $config = {
20          },          },
21          '212056' => {   # webpac2          '212056' => {   # webpac2
22                  7 => 5,                  7 => 5,
23                    14 => 30,
24          }          }
25  };  };
26    
# Line 57  while(<$fs>) { Line 58  while(<$fs>) {
58    
59          my $keep_every_days;          my $keep_every_days;
60          my $older_than_days;          my $older_than_days;
61          foreach ( sort keys %$c ) {          foreach ( sort { $b <=> $a } keys %$c ) {
62                  $older_than_days = $_;                  $older_than_days = $_;
63                  $keep_every_days = $c->{$_};                  $keep_every_days = $c->{$_};
64                  warn "## $host $age > $older_than_days" if $debug;                  warn "## $host $age > $older_than_days" if $debug;

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

  ViewVC Help
Powered by ViewVC 1.1.26