update docs
This commit is contained in:
parent
dabfc455c6
commit
1d78dc2c8d
3 changed files with 35 additions and 7 deletions
|
@ -7,7 +7,7 @@ to keep N copies of a file's content available across all repositories.
|
||||||
|
|
||||||
By default, N is 1; it is configured by annex.numcopies. This default
|
By default, N is 1; it is configured by annex.numcopies. This default
|
||||||
can be overridden on a per-file-type basis by the git-annex-numcopies
|
can be overridden on a per-file-type basis by the git-annex-numcopies
|
||||||
setting in the `.gitattributes` file.
|
setting in `.gitattributes` files.
|
||||||
|
|
||||||
`git annex drop` attempts to check with other git remotes, to check that N
|
`git annex drop` attempts to check with other git remotes, to check that N
|
||||||
copies of the file exist. If enough repositories cannot be verified to have
|
copies of the file exist. If enough repositories cannot be verified to have
|
||||||
|
|
|
@ -238,7 +238,7 @@ Many git-annex subcommands will stage changes for later `git commit` by you.
|
||||||
|
|
||||||
# CONFIGURATION
|
# CONFIGURATION
|
||||||
|
|
||||||
Like other git commands, git-annex is configured via `git-config`.
|
Like other git commands, git-annex is configured via `.git/config`.
|
||||||
Here are all the supported configuration settings.
|
Here are all the supported configuration settings.
|
||||||
|
|
||||||
* `annex.uuid` -- a unique UUID for this repository (automatically set)
|
* `annex.uuid` -- a unique UUID for this repository (automatically set)
|
||||||
|
@ -267,7 +267,7 @@ Here are all the supported configuration settings.
|
||||||
between versions.
|
between versions.
|
||||||
|
|
||||||
The backend used when adding a new file to the annex can be configured
|
The backend used when adding a new file to the annex can be configured
|
||||||
on a per-file-type basis via the `.gitattributes` file. In the file,
|
on a per-file-type basis via `.gitattributes` files. In the file,
|
||||||
the `git-annex-backend` attribute can be set to the name of the backend to
|
the `git-annex-backend` attribute can be set to the name of the backend to
|
||||||
use. For example, this here's how to use the WORM backend by default,
|
use. For example, this here's how to use the WORM backend by default,
|
||||||
but the SHA1 backend for ogg files:
|
but the SHA1 backend for ogg files:
|
||||||
|
@ -276,14 +276,14 @@ but the SHA1 backend for ogg files:
|
||||||
*.ogg git-annex-backend=SHA1
|
*.ogg git-annex-backend=SHA1
|
||||||
|
|
||||||
The numcopies setting can also be configured on a per-file-type basis via
|
The numcopies setting can also be configured on a per-file-type basis via
|
||||||
the `git-annex-numcopies` attribute. For example, this makes two copies
|
the `git-annex-numcopies` attribute in `.gitattributes` files.
|
||||||
be needed for ogg files:
|
For example, this makes two copies be needed for wav files:
|
||||||
|
|
||||||
*.ogg git-annex-numcopies=2
|
*.wav git-annex-numcopies=2
|
||||||
|
|
||||||
# FILES
|
# FILES
|
||||||
|
|
||||||
These files are used, in your git repository:
|
These files are used by git-annex, in your git repository:
|
||||||
|
|
||||||
`.git/annex/objects/` contains the annexed file contents that are currently
|
`.git/annex/objects/` contains the annexed file contents that are currently
|
||||||
available. Annexed files in your git repository symlink to that content.
|
available. Annexed files in your git repository symlink to that content.
|
||||||
|
|
|
@ -339,3 +339,31 @@ might say about a badly messed up annex:
|
||||||
git-annex: Only 1 of 2 copies exist. Run git annex get somewhere else to back it up.
|
git-annex: Only 1 of 2 copies exist. Run git annex get somewhere else to back it up.
|
||||||
failed
|
failed
|
||||||
git-annex: 2 failed
|
git-annex: 2 failed
|
||||||
|
|
||||||
|
## backups
|
||||||
|
|
||||||
|
git-annex can be configured to require more than one copy of a file exists,
|
||||||
|
as a simple backup for your data. This is controled by the "numcopies"
|
||||||
|
setting, which defaults to 1 copy. Let's change that to require 2 copies,
|
||||||
|
and send a copy of every file to a USB drive.
|
||||||
|
|
||||||
|
# echo "* git-annex-numcopies=2" >> .gitattributes
|
||||||
|
# git annex copy . --to usbdrive
|
||||||
|
|
||||||
|
Now when we try to `git annex drop` a file, it will verify that it
|
||||||
|
knows of 2 other repositories that have a copy before removing its
|
||||||
|
content from the current repository.
|
||||||
|
|
||||||
|
You can also vary the number of copies needed, depending on the file name.
|
||||||
|
So, if you want 3 copies of all your flac files, but only 1 copy of oggs:
|
||||||
|
|
||||||
|
# echo "*.ogg git-annex-numcopies=1" >> .gitattributes
|
||||||
|
# echo "*.flac git-annex-numcopies=3" >> .gitattributes
|
||||||
|
|
||||||
|
Or, you might want to make a directory for important stuff, and configure
|
||||||
|
it so anything put in there is backed up more thoroughly:
|
||||||
|
|
||||||
|
# mkdir important_stuff
|
||||||
|
# echo "* git-annex-numcopies=3" > important_stuff/.gitattributes
|
||||||
|
|
||||||
|
For more details about the numcopies setting, see [[copies]].
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue