Adds filter exclusion.

Some refactoring.
This commit is contained in:
Andrea Mazzoleni 2011-03-16 23:52:10 +01:00
parent c2d113685e
commit b9b8fd0bb8
24 changed files with 687 additions and 217 deletions

View file

@ -27,16 +27,14 @@ a lot of big files that rarely change.
The main features of SnapRAID are:
* You can start using SnapRAID with already filled disks.
You do not have to reformat or copy your data.
* The disks of the array can have different sizes.
You have only to use the biggest one for the redundancy data.
* You can add more disks at the array at any time.
* If you accidentally delete some files in a disk, you can
recover them.
* If more than one disk fails, you lose the data only on the
failed disks. All the data in the other disks is safe.
* It doesn't lock-in your data.
You can stop using SnapRAID at any time without the
need to reformat or move data.
* It doesn't lock-in your data. You can stop using SnapRAID at any
time without the need to reformat or move data.
The official site of SnapRAID is:
@ -164,6 +162,12 @@ it should contains the following options:
keep the NAME fixed.
You should use one option for each disk of the array.
exclude GLOB_PATTERN
Defines the file or directory patterns to exclude from the sync
process. See the PATTERN section for more details in the
pattern specifications.
This option can be used many times.
block_size SIZE_IN_KILOBYTES
Defines the basic block size in kilo bytes of
the redundancy blocks. The default is 128 and it should
@ -186,6 +190,9 @@ An example of a typical configuration is:
disk d1 /mnt/disk1/
disk d2 /mnt/disk2/
disk d3 /mnt/disk3/
exclude *.bak
exclude /lost+found/
exclude tmp/
block_size 256
@ -216,7 +223,49 @@ SnapRAID provides three simple commands that allow to:
disk array at the previous "sync" command.
7 OPTIONS
7 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.
There are four different types of patterns:
FILE
Excludes 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
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
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
globbing character like * and ? but they never matches a
directory slash.
This pattern is applied only to directories and not to files.
For example:
# Excludes any file named "*.bak"
exclude *.bak
# Excludes the root directory "lost+found"
exclude /lost+found/
# Excludes any directory named "tmp"
exclude tmp/
8 OPTIONS
=========
-c, --conf CONFIG
@ -245,13 +294,13 @@ SnapRAID provides three simple commands that allow to:
Prints the program version.
8 COPYRIGHT
9 COPYRIGHT
===========
This file is Copyright (C) 2011 Andrea Mazzoleni
9 SEE ALSO
==========
10 SEE ALSO
===========
rsync(1)