Adjust built-in preferred content expressions to make most types of repositories want content that is only located on untrusted or dead repositories.
This commit is contained in:
parent
c57baaaa30
commit
940e167ecc
3 changed files with 44 additions and 13 deletions
|
@ -77,13 +77,18 @@ drop content that is present! Don't go there..
|
|||
git-annex comes with some standard preferred content expressions, that can
|
||||
be used with repositories that are in some pre-defined groups. To make a
|
||||
repository use one of these, just set its preferred content expression
|
||||
to "standard", and put it in one of these groups:
|
||||
to "standard", and put it in one of these groups.
|
||||
|
||||
(Note that most of these standard expressions also make the repository
|
||||
prefer any content that is only currently available on untrusted and
|
||||
dead repositories. So if an untrusted repository gets connected,
|
||||
any repository that can will back it up.)
|
||||
|
||||
### client
|
||||
|
||||
All content is preferred, unless it's in a "archive" directory.
|
||||
|
||||
`exclude=*/archive/* and exclude=archive/*`
|
||||
`(exclude=*/archive/* and exclude=archive/*) or (not copies=semitrusted:1)`
|
||||
|
||||
### transfer
|
||||
|
||||
|
@ -95,7 +100,7 @@ USB drive used in a sneakernet.
|
|||
The preferred content expression for these causes them to get and retain
|
||||
data until all clients have a copy.
|
||||
|
||||
`not (inallgroup=client and copies=client:2) and exclude=*/archive/* and exclude=archive/*`
|
||||
`(not (inallgroup=client and copies=client:2) and exclude=*/archive/* and exclude=archive/*) or (not copies=semitrusted:1)`
|
||||
|
||||
The "copies=client:2" part of the above handles the case where
|
||||
there is only one client repository. It makes a transfer repository
|
||||
|
@ -114,20 +119,20 @@ All content is preferred.
|
|||
Only prefers content that's not already backed up to another backup
|
||||
or incremental backup repository.
|
||||
|
||||
`include=* and (not copies=backup:1) and (not copies=incrementalbackup:1)`
|
||||
`(include=* and (not copies=backup:1) and (not copies=incrementalbackup:1)) or (not copies=semitrusted:1)`
|
||||
|
||||
### small archive
|
||||
|
||||
Only prefers content that's located in an "archive" directory, and
|
||||
only if it's not already been archived somewhere else.
|
||||
|
||||
`(include=*/archive/* or include=archive/*) and not (copies=archive:1 or copies=smallarchive:1)`
|
||||
`((include=*/archive/* or include=archive/*) and not (copies=archive:1 or copies=smallarchive:1)) or (not copies=semitrusted:1)`
|
||||
|
||||
### full archive
|
||||
|
||||
All content is preferred, unless it's already been archived somewhere else.
|
||||
|
||||
`not (copies=archive:1 or copies=smallarchive:1)`
|
||||
`(not (copies=archive:1 or copies=smallarchive:1)) or (not copies=semitrusted:1)`
|
||||
|
||||
Note that if you want to archive multiple copies (not a bad idea!),
|
||||
you should instead configure all your archive repositories with a
|
||||
|
@ -155,4 +160,12 @@ local copy of every file. Instead, you can manually run `git annex get`,
|
|||
Only content that is present is preferred. Content in "archive"
|
||||
directories is never preferred.
|
||||
|
||||
`present and exclude=*/archive/* and exclude=archive/*`
|
||||
`(present and exclude=*/archive/* and exclude=archive/*) or (not copies=semitrusted:1)`
|
||||
|
||||
### unwanted
|
||||
|
||||
Use for repositories that you don't want to exist. This will result
|
||||
in any content on them being moved away to other repositories. (Works
|
||||
best when the unwanted repository is also marked as untrusted or dead.)
|
||||
|
||||
`exclude=*`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue