2011-03-28 02:52:13 +00:00
|
|
|
git-annex extends git's usual remotes with some [[special_remotes]], that
|
|
|
|
are not git repositories. This way you can set up a remote using say,
|
|
|
|
Amazon S3, and use git-annex to transfer files into the cloud.
|
|
|
|
|
2011-03-28 06:12:05 +00:00
|
|
|
First, export your S3 credentials:
|
|
|
|
|
2011-03-29 19:12:07 +00:00
|
|
|
# export ANNEX_S3_ACCESS_KEY_ID="08TJMT99S3511WOZEP91"
|
|
|
|
# export ANNEX_S3_SECRET_ACCESS_KEY="s3kr1t"
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2011-04-16 23:30:31 +00:00
|
|
|
Now, create a gpg key, if you don't already have one. This will be used
|
|
|
|
to encrypt everything stored in S3, for your privacy. Once you have
|
|
|
|
a gpg key, run `gpg --list-secret-keys` to look up its key id, something
|
|
|
|
like "2512E3C7"
|
|
|
|
|
|
|
|
Next, create the S3 remote, and describe it.
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2011-04-17 16:36:12 +00:00
|
|
|
# git annex initremote cloud type=S3 encryption=2512E3C7
|
2011-05-01 19:13:54 +00:00
|
|
|
initremote cloud (encryption setup with gpg key C910D9222512E3C7) (checking bucket) (creating bucket in US) (gpg) ok
|
2011-04-17 16:36:12 +00:00
|
|
|
# git annex describe cloud "at Amazon's US datacenter"
|
|
|
|
describe cloud ok
|
2011-03-28 17:47:29 +00:00
|
|
|
|
2011-03-29 22:21:05 +00:00
|
|
|
The configuration for the S3 remote is stored in git. So to make another
|
2011-03-29 19:12:07 +00:00
|
|
|
repository use the same S3 remote is easy:
|
|
|
|
|
|
|
|
# cd /media/usb/annex
|
2011-06-22 21:47:14 +00:00
|
|
|
# git pull laptop
|
2011-04-17 16:36:12 +00:00
|
|
|
# git annex initremote cloud
|
2011-05-01 19:13:54 +00:00
|
|
|
initremote cloud (gpg) (checking bucket) ok
|
2011-03-28 06:12:05 +00:00
|
|
|
|
|
|
|
Now the remote can be used like any other remote.
|
|
|
|
|
2011-04-17 16:36:12 +00:00
|
|
|
# git annex copy my_cool_big_file --to cloud
|
2011-05-01 19:13:54 +00:00
|
|
|
copy my_cool_big_file (gpg) (checking cloud...) (to cloud...) ok
|
2011-04-17 16:36:12 +00:00
|
|
|
# git annex move video/hackity_hack_and_kaxxt.mov --to cloud
|
2011-05-01 18:05:10 +00:00
|
|
|
move video/hackity_hack_and_kaxxt.mov (checking cloud...) (to cloud...) ok
|
2011-03-28 02:52:13 +00:00
|
|
|
|
2011-05-16 06:07:59 +00:00
|
|
|
See [[special_remotes/S3]] for details.
|