19 Commits
hanoi ... zevo

Author SHA1 Message Date
45edfd3e7c Merge pull request #9 from mk01/zevo
Zevo
2013-01-14 11:05:37 -08:00
85dd8dad9a missing quotations, under bash ok, under dash critical 2013-01-14 11:13:47 +01:00
feea013d3c cosmetic bug which showed filesystem added for regular snapshot as recursive 2013-01-14 11:07:54 +01:00
ad9a57eeaf better snapshot consistency testing during --send-full and -R 2013-01-14 11:06:03 +01:00
82ff4b2f80 bug fix (wrong recursive filesystem list expansion)
in case of empty filesystem list going for recursive snapshot all
filesystems have been processed
2013-01-14 10:56:49 +01:00
9bf3d5b017 Revert "bug fix (wrong recursive filesystem list expansion)"
This reverts commit d6c05fb8f4.
2013-01-14 10:37:32 +01:00
ba171cc032 Revert "bug fix (snapshot list created for destroy in case of incremental send through replication)"
This reverts commit 8b155cf4da.
2013-01-14 10:37:13 +01:00
8b155cf4da bug fix (snapshot list created for destroy in case of incremental send through replication) 2013-01-14 10:35:32 +01:00
d6c05fb8f4 bug fix (wrong recursive filesystem list expansion)
in case of empty filesystem list going for recursive snapshot all
filesystems have been processed
2013-01-14 10:35:03 +01:00
4bbfa476b1 general cleanup, quotations updates etc 2013-01-09 14:17:49 -06:00
583fc20e28 error return codes renumbering, parameter checking for --send 2013-01-03 14:49:05 -06:00
2d789bdf1d detection of system (Linux/Darwin). proper detection of mounted snapshots prior to umount.
detection of system applies for local and remote operations. should run
on linux and macosx with no modifications in the code.
2013-01-03 14:49:05 -06:00
8aaf5f904b issue #8 should be solved by this patch
all filesystems with snapdir=visible and canmount=on are traversed for
snapshots going to be removed and umount -f is called.

on linux, on /proc/mounts such mounted snapshots are visible (not
listed with 'mount'), but under macosx no proc exists, 'mount' again
does not list them so umount -f is called with no mercy for all
specific combination of fs and snapname  (but should not cause any
problems).

there is no specific logic to utilize /proc/mount on linux, same
approach is taken.
2012-12-28 14:14:23 -06:00
6f91e10033 mktemp on macosx uses some .Xs by default, which is not the case on linux 2012-12-28 14:14:23 -06:00
1099c622cb comments update 2012-12-27 20:58:22 -06:00
70632c00b7 going back to standard /bin/sh (bash 3.x on macosx) 2012-12-27 20:58:22 -06:00
90825db245 README updates 2012-12-27 20:58:22 -06:00
676ded6217 fix for filesystem expansion when using '//' 2012-12-27 20:58:22 -06:00
4d20aa4c79 Zevo support. 2012-12-27 20:58:10 -06:00
5 changed files with 529 additions and 308 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.DS_Store

View File

@ -11,7 +11,5 @@ install:
install etc/zfs-auto-snapshot.cron.daily $(DESTDIR)$(PREFIX)/etc/cron.daily/zfs-auto-snapshot
install etc/zfs-auto-snapshot.cron.weekly $(DESTDIR)$(PREFIX)/etc/cron.weekly/zfs-auto-snapshot
install etc/zfs-auto-snapshot.cron.monthly $(DESTDIR)$(PREFIX)/etc/cron.monthly/zfs-auto-snapshot
install -d $(DESTDIR)$(PREFIX)/share/man/man8
install src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8
install -d $(DESTDIR)$(PREFIX)/sbin
install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot

6
README
View File

@ -1,12 +1,14 @@
zfs-auto-snapshot:
An alternative implementation of the zfs-auto-snapshot service for Linux
that is compatible with zfs-linux and zfs-fuse.
An alternative implementation of the zfs-auto-snapshot service for Macosx
that is compatible with ZEVO community zfs.
Automatically create, rotate, and destroy periodic ZFS snapshots. This is
the utility that creates the @zfs-auto-snap_frequent, @zfs-auto-snap_hourly,
@zfs-auto-snap_daily, @zfs-auto-snap_weekly, and @zfs-auto-snap_monthly
snapshots if it is installed.
It can backup to remote systems utilizing zfs send command.
This program is a posixly correct bourne shell script. It depends only on
the zfs utilities and cron, and can run in the dash shell.

View File

@ -1,70 +0,0 @@
.TH ZFS-AUTO-SNAPSHOT "8" "June 16, 2013" "zfs-auto-snapshot.sh" "System Administration Commands"
.SH NAME
zfs-auto-snapshot \- take regular ZFS snapshots
.SH SYNOPSIS
.B zfs-auto-snapshot
[\fIoptions\fR] [\fI-l label\fR] \fI<'//' | name \fR[\fIname\fR...]\fI>\fR
.SH DESCRIPTION
.B zfs-auto-snapshot
automatically creates, rotates, and destroys snapshots for all your
ZFS datasets, and is compatible with both zfsonlinux and zfs-fuse.
.SH OPTIONS
.TP
\fB\-\-default\-exclude\fR
By default \fBzfs-auto-snapshot\fR will snapshot all datasets except
for those in which the user-property \fBcom.sun:auto-snapshot\fR is
set to \fBfalse\fR. This option reverses the behavior and requires
\fBcom.sun:auto-snapshot\fR to be set to \fBtrue\fR.
.TP
\fB\-d\fR, \fB\-\-debug\fR
Print debugging messages.
.TP
\fB\-e\fR, \fB\-\-event\fR=\fIEVENT\fR
Set the com.sun:auto\-snapshot\-desc property to EVENT.
.TP
\fB\-\-fast\fR
Use a faster zfs list invocation.
.TP
\fB\-n\fR, \fB\-\-dry\-run\fR
Print actions without actually doing anything.
.TP
\fB\-s\fR, \fB\-\-skip\-scrub\fR
Do not snapshot filesystems in scrubbing pools.
.TP
\fB\-h\fR, \fB\-\-help\fR
Print the usage message.
.TP
\fB\-k\fR, \fB\-\-keep\fR=\fINUM\fR
Keep NUM recent snapshots and destroy older snapshots.
.TP
\fB\-l\fR, \fB\-\-label\fR=\fILAB\fR
LAB is usually 'hourly', 'daily', or 'monthly'.
.TP
\fB\-p\fR, \fB\-\-prefix\fR=\fIPRE\fR
PRE is 'zfs\-auto\-snap' by default.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Suppress warnings and notices at the console.
.TP
\fB\-\-send\-full\fR=\fIF\fR
Send zfs full backup. Unimplemented.
.TP
\fB\-\-send\-incr\fR=\fIF\fR
Send zfs incremental backup. Unimplemented.
.TP
\fB\-\-sep\fR=\fICHAR\fR
Use CHAR to separate date stamps in snapshot names.
.TP
\fB\-g\fR, \fB\-\-syslog\fR
Write messages into the system log.
.TP
\fB\-r\fR, \fB\-\-recursive\fR
Snapshot named filesystem and all descendants.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Print info messages.
.TP
name
Filesystem and volume names, or '//' for all ZFS datasets.
.SH SEE ALSO
.BR zfs (8)

File diff suppressed because it is too large Load Diff