mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-28 19:06:42 -05:00
Adds filter capability in check and fix.
Fixes the context saving when only changed files are detected.
This commit is contained in:
parent
ba73d0c574
commit
a70eb4ed2b
13 changed files with 272 additions and 69 deletions
37
snapraid.txt
37
snapraid.txt
|
|
@ -6,7 +6,7 @@
|
|||
1 SYNOPSIS
|
||||
==========
|
||||
|
||||
snapraid [-c, --conf CONFIG]
|
||||
snapraid [-c, --conf CONFIG] [-f, --filter PATTERN]
|
||||
[-Z, --force-zero] [-E, --force-empty]
|
||||
[-s, --start BLKSTART] [-t, --count BLKCOUNT]
|
||||
[-v, --verbose]
|
||||
|
|
@ -188,6 +188,14 @@ SnapRAID provides three simple commands that allow to:
|
|||
the file '/etc/snapraid.conf' in Unix, and 'snapraid.conf'
|
||||
in Windows.
|
||||
|
||||
-f, --filter PATTERN
|
||||
Filters the files to operate on with the "check" and "fix"
|
||||
commands. This option is ignored with the "sync" command.
|
||||
See the PATTERN section for more details in the
|
||||
pattern specifications.
|
||||
This option can be used many times.
|
||||
In Unix, ensure to quote globbing chars if used.
|
||||
|
||||
-Z, --force-zero
|
||||
Forces the insecure operation of syncing a file with zero
|
||||
size that before was not empty.
|
||||
|
|
@ -264,7 +272,8 @@ it should contains the following options:
|
|||
|
||||
exclude PATTERN
|
||||
Defines the file or directory patterns to exclude from the sync
|
||||
process. See the PATTERN section for more details in the
|
||||
process.
|
||||
See the PATTERN section for more details in the
|
||||
pattern specifications.
|
||||
This option can be used many times.
|
||||
|
||||
|
|
@ -304,37 +313,36 @@ An example of a typical configuration is:
|
|||
8 PATTERN
|
||||
=========
|
||||
|
||||
Patterns are used to define the files and directories to exclude
|
||||
from the redundancy process.
|
||||
|
||||
It makes sense to exclude any file not worth to be saved or that
|
||||
changes often.
|
||||
Patterns are used select a subset of files to exclude or operate on.
|
||||
|
||||
There are four different types of patterns:
|
||||
|
||||
FILE
|
||||
Excludes any file named as FILE. You can use any globbing
|
||||
Selects any file named as FILE. You can use any globbing
|
||||
character like * and ?.
|
||||
This pattern is applied only to files and not to directories.
|
||||
|
||||
DIR/
|
||||
Excludes any directory named DIR. You can use any globbing
|
||||
Selects any directory named DIR. You can use any globbing
|
||||
character like * and ?.
|
||||
This pattern is applied only to directories and not to files.
|
||||
|
||||
/PATH/FILE
|
||||
Excludes the exact specified file path. You can use any
|
||||
Selects the exact specified file path. You can use any
|
||||
globbing character like * and ? but they never matches a
|
||||
directory slash.
|
||||
This pattern is applied only to files and not to directories.
|
||||
|
||||
/PATH/DIR/
|
||||
Excludes the exact specified directory path. You can use any
|
||||
Selects the exact specified directory path. You can use any
|
||||
globbing character like * and ? but they never matches a
|
||||
directory slash.
|
||||
This pattern is applied only to directories and not to files.
|
||||
|
||||
For example:
|
||||
Note that when globbing char are used in the command line, you have to
|
||||
quote them in Unix. Otherwise the shell will try to expand them.
|
||||
|
||||
For example, in the configuration file:
|
||||
# Excludes any file named "*.bak"
|
||||
exclude *.bak
|
||||
# Excludes the root directory "/lost+found"
|
||||
|
|
@ -342,6 +350,11 @@ For example:
|
|||
# Excludes any directory named "tmp"
|
||||
exclude tmp/
|
||||
|
||||
For example, in the command line:
|
||||
# Checks only the .mp3 files.
|
||||
# Note the "" use to avoid globbing expansion by the shell.
|
||||
snapraid -f "*.mp3" check
|
||||
|
||||
|
||||
9 CONTENT
|
||||
=========
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue