summaryrefslogtreecommitdiff
path: root/doc/walkthrough/backups.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-02-27 12:45:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-02-27 12:45:48 -0400
commit98e246b49b3c4fed319fe7bc1e900ba20ebfc9e1 (patch)
treead49ec6baf1b57f3acc8b694bdfc1bbd0986021f /doc/walkthrough/backups.mdwn
parent9e49a71282def0b6d6f7507d59eb0f805c6e0073 (diff)
split the walkthrough and inline back together
Diffstat (limited to 'doc/walkthrough/backups.mdwn')
-rw-r--r--doc/walkthrough/backups.mdwn25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/walkthrough/backups.mdwn b/doc/walkthrough/backups.mdwn
new file mode 100644
index 000000000..9723022b4
--- /dev/null
+++ b/doc/walkthrough/backups.mdwn
@@ -0,0 +1,25 @@
+git-annex can be configured to require more than one copy of a file exists,
+as a simple backup for your data. This is controlled by the "annex.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 "* 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 annex.numcopies=1" >> .gitattributes
+ # echo "*.flac 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 "* annex.numcopies=3" > important_stuff/.gitattributes
+
+For more details about the numcopies setting, see [[copies]].