• Super-simple perl script for zfs snapshots

    June 1, 2007

    Here’s a simple script for creating daily zfs snapshots that get rotated every week (so you always have one for Mon, Tues, Wed, etc) #!/usr/bin/perl use warnings; use strict; my $zfsname = shift || die “Need a filesystem name\n”; my $day = `date`; $day =~ s/(Sun|Mon|Tue|Wed|Thu|Fri|Sat)[\S\s]+/$1/gi; my $snapname = “$zfsname\@$day”; my $exist = system(“zfs list […]

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org