clean up docs, add docs for `-l`
This commit is contained in:
parent
e4ba772f2c
commit
5c3f3d934f
10
CHANGES.md
10
CHANGES.md
|
@ -4,23 +4,25 @@ ZFS Prune Snapshots Changes
|
||||||
Not Yet Released
|
Not Yet Released
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
- Show snapshot size (used) and number of snapshots processed
|
- Show snapshot size (used) and number of snapshots processed (6e3891ddd1)
|
||||||
|
- Add list only option (`-l`) to just list datasets that match (e4ba772f2c)
|
||||||
|
|
||||||
`v1.3.0`
|
`v1.3.0`
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- Add recursive deletion option (-R) (482420faba)
|
- Add recursive deletion option (`-R`) (482420faba)
|
||||||
|
|
||||||
`v1.2.0`
|
`v1.2.0`
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- Add zfs binary check ([#8](https://github.com/bahamas10/zfs-prune-snapshots/pull/8))
|
- Add zfs binary check ([#8](https://github.com/bahamas10/zfs-prune-snapshots/pull/8))
|
||||||
- Support inverting of prefix/suffix match ([#17](https://github.com/bahamas10/zfs-prune-snapshots/pull/17))
|
- Support inverting of prefix/suffix match (`-i`)
|
||||||
|
([#17](https://github.com/bahamas10/zfs-prune-snapshots/pull/17))
|
||||||
|
|
||||||
`v1.1.0`
|
`v1.1.0`
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- Support suffix matching (-s) (e7aa72160f8)
|
- Support suffix matching (`-s`) (e7aa72160f8)
|
||||||
|
|
||||||
`v1.0.1`
|
`v1.0.1`
|
||||||
--------
|
--------
|
||||||
|
|
11
README.md
11
README.md
|
@ -53,7 +53,7 @@ be considered for deletion - possible specifiers are
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
usage: zfs-prune-snapshots [-hniqvV] [-p <prefix] <time> [[dataset1] ...]
|
usage: zfs-prune-snapshots [-hnliqRvV] [-p <prefix>] [-s <suffix>] <time> [[dataset1] ...]
|
||||||
|
|
||||||
remove snapshots from one or more zpools that match given criteria
|
remove snapshots from one or more zpools that match given criteria
|
||||||
|
|
||||||
|
@ -78,6 +78,10 @@ Usage
|
||||||
remove snapshots older than two months on the tank pool that end
|
remove snapshots older than two months on the tank pool that end
|
||||||
with the string "_frequent"
|
with the string "_frequent"
|
||||||
|
|
||||||
|
# zfs-prune-snapshots -i -p 'autosnap_' 1M zones
|
||||||
|
remove snapshots older than a month on the zones pool that do not
|
||||||
|
start with the string "autosnap_"
|
||||||
|
|
||||||
timespec
|
timespec
|
||||||
the first argument denotes how old a snapshot must be for it to
|
the first argument denotes how old a snapshot must be for it to
|
||||||
be considered for deletion - possible specifiers are
|
be considered for deletion - possible specifiers are
|
||||||
|
@ -93,10 +97,13 @@ Usage
|
||||||
options
|
options
|
||||||
-h print this message and exit
|
-h print this message and exit
|
||||||
-n dry-run, don't actually delete snapshots
|
-n dry-run, don't actually delete snapshots
|
||||||
|
-l list only mode, just list matching snapshots names
|
||||||
|
without deleting (like dry-run mode with machine-parseable output)
|
||||||
-p <prefix> snapshot prefix string to match
|
-p <prefix> snapshot prefix string to match
|
||||||
-s <suffix> snapshot suffix string to match
|
-s <suffix> snapshot suffix string to match
|
||||||
-i invert matching of prefix and suffix
|
-i invert matching of prefix and suffix
|
||||||
-q quiet, do not printout removed snapshots
|
-q quiet, do not printout removed snapshots
|
||||||
|
-R recursively delete, pass '-R' directly to 'zfs destroy'
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
-V print the version number and exit
|
-V print the version number and exit
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,10 @@ print this message and exit
|
||||||
\fB\fC\-n\fR
|
\fB\fC\-n\fR
|
||||||
dry\-run, don't actually delete snapshots
|
dry\-run, don't actually delete snapshots
|
||||||
.TP
|
.TP
|
||||||
|
\fB\fC\-l\fR
|
||||||
|
list only mode, just list matching snapshots names without deleting (like
|
||||||
|
dry\-run mode with machine\-parseable output)
|
||||||
|
.TP
|
||||||
\fB\fC\-p <prefix>\fR
|
\fB\fC\-p <prefix>\fR
|
||||||
snapshot prefix string to match
|
snapshot prefix string to match
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -27,6 +27,10 @@ OPTIONS
|
||||||
`-n`
|
`-n`
|
||||||
dry-run, don't actually delete snapshots
|
dry-run, don't actually delete snapshots
|
||||||
|
|
||||||
|
`-l`
|
||||||
|
list only mode, just list matching snapshots names without deleting (like
|
||||||
|
dry-run mode with machine-parseable output)
|
||||||
|
|
||||||
`-p <prefix>`
|
`-p <prefix>`
|
||||||
snapshot prefix string to match
|
snapshot prefix string to match
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ VERSION='v1.3.0'
|
||||||
usage() {
|
usage() {
|
||||||
local prog=${0##*/}
|
local prog=${0##*/}
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
usage: $prog [-hniqRvV] [-p <prefix>] [-s <suffix>] <time> [[dataset1] ...]
|
usage: $prog [-hnliqRvV] [-p <prefix>] [-s <suffix>] <time> [[dataset1] ...]
|
||||||
|
|
||||||
remove snapshots from one or more zpools that match given criteria
|
remove snapshots from one or more zpools that match given criteria
|
||||||
|
|
||||||
|
@ -55,6 +55,8 @@ usage() {
|
||||||
options
|
options
|
||||||
-h print this message and exit
|
-h print this message and exit
|
||||||
-n dry-run, don't actually delete snapshots
|
-n dry-run, don't actually delete snapshots
|
||||||
|
-l list only mode, just list matching snapshots names
|
||||||
|
without deleting (like dry-run mode with machine-parseable output)
|
||||||
-p <prefix> snapshot prefix string to match
|
-p <prefix> snapshot prefix string to match
|
||||||
-s <suffix> snapshot suffix string to match
|
-s <suffix> snapshot suffix string to match
|
||||||
-i invert matching of prefix and suffix
|
-i invert matching of prefix and suffix
|
||||||
|
|
Loading…
Reference in New Issue