Commit Graph

81 Commits

Author SHA1 Message Date
99e1a6103d Initiate changelog 2019-09-25 13:25:05 +00:00
86a95095ee Add note about macos compatibility 2019-09-25 15:13:00 +02:00
363a847ee3 Merge pull request #94 from aimileus/macos
Support macOS with Homebrew gnu-getopt
2019-09-25 15:10:13 +02:00
12945110d3 Merge pull request #107 from ArakniD/master
Updated zfs-auto-snapshot.sh
2019-09-25 15:08:23 +02:00
d5646c901e Install from release instead of master
Install from release instead of master
2019-09-25 15:06:33 +02:00
4a59d0d615 Updated zfs-auto-snapshot.sh
Updated old snapshot removal to include the optional snapshot label
2019-09-07 14:56:30 +10:00
ef7ae674f5 Merge pull request #98 from diablodale/missing-log-info
fix for verbose logging not working
2019-04-12 22:54:42 +02:00
b0a5909335 Merge pull request #42 from FransUrbo/snapname_fix
Fix SNAPNAME and SNAPGLOB.
2019-04-12 22:53:29 +02:00
3689b2c43d Merge pull request #91 from schors/master
Fix recursive snapshots
2019-04-12 22:47:53 +02:00
d27bbfa650 Merge pull request #96 from diablodale/uninstall
add uninstall - fix zfsonlinux/zfs-auto-snapshot#95
2019-04-12 22:47:29 +02:00
897ca026e1 Merge pull request #59 from rkarlsba/patch-3
Added --min-size
2019-04-12 22:46:38 +02:00
3e48c8956e Merge pull request #100 from jsoref/spelling
spelling: construction
2019-04-12 22:35:17 +02:00
3efc478828 spelling: construction 2018-11-25 20:32:28 -05:00
c99de67c63 fix verbose logging
- corrects regression introduced
2018-10-15 18:20:13 +02:00
4425d681f3 add uninstall - fix zfsonlinux/zfs-auto-snapshot#95
- intentionally does not remove directories
- intentionally does not force deletes
2018-10-13 19:50:50 +02:00
6f6d1202cf Support macOS with Homebrew gnu-getopt 2018-09-29 11:09:27 +02:00
6ee4553cf6 Fix jjj vs jj bug in recursive snapshot selection 2018-07-12 13:03:07 +03:00
6c7da10e24 Fix recursive snapshot 2018-07-11 17:32:57 +03:00
3d9992b086 Undo PR#82 (fixes #86 and fixes #87) 2018-06-15 13:10:29 +02:00
f145cf6e07 Revert PR85 2018-04-21 09:27:26 +02:00
838b03b41f Merge pull request #82 from attie/improve_list
Improve performance of listings
2018-04-17 13:34:47 +02:00
e1268767b8 Merge pull request #85 from riyad/fix-recursive-snapshots-with-noauto-descendants
Fix recursive snapshots for datasets with noauto descendants
2018-04-17 13:33:38 +02:00
e93096c2d9 Fix recursive snapshots for datasets with noauto descendants
Fixes #80
2018-04-11 14:38:22 +02:00
1ae1adc5f0 Merge pull request #79 from jbnance/man-page-perms
Set permissions on man page to 0644 when installing
2018-03-13 14:14:13 +02:00
41eddc97cc only list entities that we are interested in 2018-01-18 17:22:30 +00:00
2b7b694a95 Set permissions on man page to 0644 when installing 2017-12-27 15:34:39 -06:00
277287f824 Further cron logic cleanups upstream/1.2.4 2017-09-18 09:25:02 +02:00
d49be6a2de Merge pull request #69 from mailinglists35/patch-4
make --quiet really quiet
upstream/1.2.3
2017-09-14 11:22:43 +02:00
2e1f309131 Merge pull request #68 from lindhe/fix-broken-cron
Fix broken cron scripts
2017-07-11 13:44:13 +02:00
1666623191 make --quiet really quiet
--quiet still prints the name of the datasets when print_log is called at lines 548/551
2017-07-06 13:15:56 +03:00
739972f18a Found a way to exec the process and yet have it work 2017-07-06 09:20:54 +02:00
8c45add2c0 Fix broken cron scripts
I found that none of the daily, hourly, weekly or monthly snapshots were
being taken. When I looked into it I found that the scripts didn't
execute properly, because of the newly introduced check (9c6f065).

I'm not versed enough with POSIX to understand if there was some clever
intention with using exec than just calling which by it self, but it
works without exec so I removed it.
2017-07-05 23:21:29 +02:00
9c6f065589 Check whether we have zfs-auto-snapshot before running it upstream/1.2.2 2017-06-06 11:06:16 +02:00
62f5f7d920 Merge pull request #33 from aphor/master
zfs destroy will use -d for deferred destruction
2017-01-27 20:28:01 +02:00
b74769894c Merge pull request #35 from bernhardschmidt/master
Fix frequent cronjob
2017-01-27 20:08:24 +02:00
11130ba8d6 Merge pull request #43 from FransUrbo/prettify_SNAPSHOTS_OLD
"Prettify" long command line
2017-01-27 20:07:39 +02:00
27413ac798 Added --min-size
Added an option to inhibit generation of empty (or very small) snapshots.
2017-01-16 00:59:13 +01:00
c4ad5eeac5 Break up the huge line where SNAPSHOTS_OLD (if --fast was used) to make
it easier to read and follow.
2015-04-03 17:34:16 +02:00
6e32b25d8f Fix SNAPNAME and SNAPGLOB.
* Currently the following command line:

    zfs-auto-snapshot.sh.orig --keep 7 --label daily --prefix '' --sep '-' \
      --event "daily-$(date --utc +"%Y%m%d.%H%M")" --recursive --verbose //

  will give the following result:

    zfs snapshot -o com.sun:auto-snapshot-desc='daily-20150403.0013' \
      -r 'share/.Bacula@-daily-2015-04-03-0013'

* If instead 'prefix=daily', this would be the result:

    zfs snapshot -o com.sun:auto-snapshot-desc='daily-20150403.0015' \
      -r 'share/.Bacula@daily-daily-2015-04-03-0016'

* If 'prefix=daily' and 'label=NULL':

    zfs snapshot -o com.sun:auto-snapshot-desc='daily-20150403.0017' \
      -r 'share@daily'

This because SNAPNAME is constructed wrongly. Instead, only separate
the 'prefix' from the 'label' with 'sep' if 'prefix' is actually set.
2015-04-03 02:12:16 +02:00
b2e97c5fe0 use long options in frequent cronjob 2014-12-29 20:07:18 +01:00
d3bdd2dc23 include default installation prefix in frequent cronjob 2014-12-29 20:05:26 +01:00
f2767ad43a zfs destroy will use -d for deferred destruction
I am working on a complimentary script that does log-shipping style replication to a backup volume for highly efficient incremental backups. This relies on "zfs send -R" and that the sets of snapshots existing on the source and backup destination overlap by at least one snapshot. I plan to use snapshot clones to place a "checkpoint" reservation on a snapshot that will be required for future backups.

In order to keep zfs-auto-snapshot from destroying a snapshot necessary for a future incremental backup replication stream, I will create an unmounted clone of that snapshot, and destroy any prior clones when the backup completes. 

Any snapshots destroyed by the zfs-auto-snapshot "zfs destroy -d" will be destroyed as the dependent clones are destroyed. Without the -d option, zfs-auto-snapshot would fail to destroy the old snapshot with a checkpoint clone, and it would persist until later snapshot jobs destroy it in subsequent runs. Since monthlies and weeklies are relatively infrequent, deferred destruction will reap the snapshots opportunistically as soon as the "checkpoint" clones are gone. Intermediate snapshots between the "checkpoint" reserved snapshots and the recent snapshots preserved by the zfs-auto-snapshot.sh will still be immediately destroyed.
2014-11-17 19:21:52 -06:00
d5cb31aaae Install the cron.d part without the execute bit.
Resolve this lintian error:

	E: zfs-auto-snapshot: bad-permissions-for-etc-cron.d-script etc/cron.d/zfs-auto-snapshot 0755 != 0644
	W: zfs-auto-snapshot: executable-not-elf-or-script etc/cron.d/zfs-auto-snapshot

This should also resolve a related failure on Arch Linux.

Closes: zfsonlinux/zfs-auto-snapshot#4
Thanks: @bitloggerig
Thanks: @scottj97
2014-10-13 23:12:53 -05:00
1ce72681bf Merge pull request #31 from virtualguy/patch-1
Update README
2014-10-13 20:41:01 -04:00
a0df1ebcc1 Merge pull request #30 from mbaynton/remove-only
--destroy-only switch, --{pre,post} fixes
2014-10-13 20:39:40 -04:00
0be4466869 Merge pull request #29 from mmalecki/pre-post
Add pre and post snapshot hooks
2014-10-13 20:37:12 -04:00
9d2398ed8e Merge pull request #26 from borutmrak/master
Fix manpage path
2014-10-13 20:31:06 -04:00
bc1b65a66e Update README
Add some simple installation instructions
2014-08-18 21:38:32 +12:00
bfe4c911a8 Make --{pre,post}-snapshot optional, add --destroy-only, revise docs 2014-08-09 17:23:02 -05:00
10f9b3e336 Document `--{pre,post}-snapshot 2014-08-07 02:08:29 +02:00