rsync - How to exclude wildcard directory but include wildcard files using rdiff-backup? -


I'm using really awesome simple powerful backup tool though I'm fighting with Wild Card Globe Pattern. The structure is:

  / data / aaa / cache / data / bbb / cache / data / ccc / cache etc ....   

each cache directory The original files and cache files in the original files are named only 1.jpg , 2.png , 3.gif , and so on. is. The cache file contains a string connected to some basic file name.

So I want to backup all / data / * / cache directories, but only include the original files, not the cache files.

I am using this command:
rdiff-backup --exclude ** / cache --include ** / cache / + ([0-9]). + ([Az]) / data / backup

but rdiff-backup returns this and I'm lost:

  initial backup should be interrupted There are ... Fatal error: Final selection expression: The globe in the command line includes: ** / cache / + ([0- 9]). ([A-z]) Specifies that files must be included. By default all files are included, so the expression is meaningless because it's probably not for you.    

From:

  Returns the given file Is kept by the file selection system when the first match file selection condition specifies that the file is excluded; Otherwise the file is included.   

...

  For example, rdiff-backup - contains / usr --exclude / usr / usr / backups in the same way Rdiff-backup / usr / backup because the instructions include and exclude directions match exactly the same file, and - first of all included, give it priority   

Then, your case In this, it is complaining about the last - include , because if a file is found (i.e. this is the last - excluded ) This will include the - Include matches or not.

Think what the error message was saying.

How to Complete Your Goal ...

Assume that you want to exclude the only form: / data / * / Cash / [0-9] *. [Az] [az] [az]? * Just specify:

  rdiff -backup --exclude '/data/*/cache/[0-9]*.[az][אaz][az] ? * '- Additional' * '/ data / backup   

This should work (I have not tested it).

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -