aboutsummaryrefslogtreecommitdiff
path: root/doc/walkthrough.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-28 17:54:42 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-28 17:54:42 -0400
commit1d78dc2c8db2550b530a87cf893c2445162e4ea1 (patch)
treed0f18e549b16a8be6e2a0c33d3f39ae1f87f2fbe /doc/walkthrough.mdwn
parentdabfc455c678b073dadda41a4029493716e29c84 (diff)
update docs
Diffstat (limited to 'doc/walkthrough.mdwn')
-rw-r--r--doc/walkthrough.mdwn28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/walkthrough.mdwn b/doc/walkthrough.mdwn
index 281f46050..9d4d2ce59 100644
--- a/doc/walkthrough.mdwn
+++ b/doc/walkthrough.mdwn
@@ -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.
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]].