I'm just getting started with git-annex and trying to wrap my head around using it with Amazon S3. I am familiar with using git, but things are a bit different as we can't init a repo at S3 directly.

I've followed http://git-annex.branchable.com/tips/using_Amazon_S3/, and performed:

git init
Initialized empty Git repository in /home/
git annex init
init ok
git annex initremote s3 type=S3 encryption=FOOBAR bucket=foo
initremote s3 (encryption setup with gpg key YGTVT51715TFR) (checking bucket...) (gpg) ok
git annex describe s3 "Amazon S3"
describe s3 ok
git annexx add foo/
add foo/bar.txt
add foo/bar.png
...etc
git annex sync
51 files changed, 51 insertions(+)
create mode 120000 foo/bar.txt
create mode 120000 foo/bar.png
...etc

Looking at http://git-annex.branchable.com/git-annex/, I thought the files added would then be pushed to S3 by git annex sync, but that doesn't seem to be the case. I've also tried variations of got annex copy, like git annex copy . --to s3, without any luck.

Is there a way to push to s3?

Any help is appreciated!

git annex sync only syncs git metadata, not file contents, and metadata is not stored on S3, so it does notthing (much).

git annex move . --to s3 or git annex copy . --to s3 is the right way to send the files to S3. I'm not sure why you say it's not working. I'd try it but Amazon is not letting me sign up for S3 again right now. Can you show what goes wrong with copy?

Comment by http://joeyh.name/ Tue May 29 19:09:50 2012
It's strange. I've done some testing on another machine, and this one, and the issue seems to be with adding only certain sub-directories of the git-annex directory. Would it cause an issue with git-annex if a sub-directory was a git repo?
If the subdirectory has a .git, then it's a separate git repo, and inside the directory, all git (and git-annex) commands in it will operate on that nested repo and ignore the outside one.
Comment by http://joeyh.name/ Wed May 30 00:54:38 2012
Comments on this page are closed.