Commit 6e32b25
committed
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.1 parent d5cb31a commit 6e32b25
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
| 536 | + | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| |||
0 commit comments