Darik Horn
d99147db7a
Set keep=8 in the weekly cron job.
...
A default of keep=8 for weekly snapshot is more useful than keep=4,
which is no more protective than the default daily schedule.
2011-12-21 20:29:27 -06:00
Darik Horn
c8507a0da9
Change objects to datasets in help and comments.
...
In the usage synopsis and program comments, change "objects" to
"datasets" for consistency with upstream ZFS terminology.
2011-12-18 07:34:40 -06:00
Darik Horn
74359e51a7
Fix the hourly-daily transposition in the Makefile.
...
The hourly cron job was installed to cron.daily, and the daily cron
job was installed to cron.hourly, which caused incorrect scheduling.
2011-11-28 00:07:30 -06:00
Darik Horn
afdae86271
Remove redundant lines in the cron.d file.
2011-11-28 00:05:43 -06:00
Darik Horn
4b7609791b
Split the cron file for anacron compatibilty.
...
Split the cron file so that the hourly, daily, weekly, and monthly
zfs automatic snapshots still happen even if the system is offline
temporarily during the scheduled event, such as during a reboot.
On Debian systems, if anacron is installed, then it is used to run
the /etc/cron.{hourly,daily,weekly,monthly} directories, but not
the /etc/cron.d directory. This means that /etc/cron.d jobs are not
run if the system is offline when crond would usually invoke them.
2011-11-25 14:26:08 -06:00
Darik Horn
5ce7a23384
Implement the --event option for :auto-snap-desc.
...
Set the com.sun:auto-snap-desc property on each snapshot to an
arbitrary value. On Solaris, this property is set to the dash
character by default -- which is convention for NULL -- but it
can contain an FMRI status comment or other user data.
2011-11-23 10:44:32 -06:00
Darik Horn
2e26499f6a
Rebase exit codes to above 127.
...
Most standard shell utilities return errors less than 128. Rebase the
exit codes of this script to reduce the liklihood of overlap.
2011-11-23 10:03:56 -06:00
Darik Horn
f7ceb28963
Implement --prefix parameter checking.
...
Also add -p to the getopt list of short options.
2011-11-23 10:00:24 -06:00
Darik Horn
4c14da4130
Consistently quote literal strings.
...
Apply some syntax hygiene. Quoting everything is a safe habit because
unquoted things can have subtle side-effects.
2011-11-22 23:36:51 -06:00
Darik Horn
249e6a4cb3
Fold the main loops into a do_snapshots function.
...
The two primary `for` loops were identical except for the '-r' flag.
2011-11-22 23:27:24 -06:00
Darik Horn
a0a43a42af
Invert the --skip-scrub test.
...
The $opt_skip_scrub option was tested incorrectly, which caused
the --skip-scrub option to operate opposite intent.
2011-11-22 22:09:23 -06:00
Darik Horn
d8b1730015
Add an explicit exit 0
to the end of the script.
...
The implicit return is "$?", which can be set non-zero by
an earlier command.
2011-11-21 21:44:37 -06:00
Darik Horn
adebbd6fee
Add -q to the getopt list of short options.
...
This corresponds to the --quiet option.
2011-11-21 21:40:04 -06:00
Darik Horn
5bdcaad4bf
Expand the options variable in the cron part file.
...
Cron doesn't do variable substitution and zfs-auto-snapshot doesn't
load options from its environment.
2011-11-21 20:40:24 -06:00
Darik Horn
875b55c967
Repository creation.
2011-11-21 19:47:20 -06:00