I'm trying to find a way of syncing data across multiple platforms, including an android device. The latter I want to sync the data so that it's on the devices SD filesystem and independent of network. As far as I can tell git-annex's client is the only one that can do this, all other self hosted storage clients I've found are only network viewers (owncloud, seafile), which is no good to me. I want to sync my ABC sheet music collection onto it, viewable independent of network access, updating changes automatically. Other parts of the data set (i.e. large collection of cannon cr2 raws), I want synced between my laptop and desktop.
I've set up git annex with a central git repo and another client directory which syncs fine to the server (set as a 'full backup'). Now I want to download this whole archive onto the android device. I've set up the client on the device and it works and will upload to the server, however I can't see any way of getting it to download. Surely git-annex has the capability to pull data?
Yes, it absolutely does. On Android, git-annex defaults to making its repository be a "source" repository, which means it doesn't try to get a copy of every file. You can edit the repository in the webapp, and select "client" and it will go ahead and download every file it can get. See standard groups.
It sounds like you might want to have the android device only get copies of certian files, and ignore others (the raws). Doing that is a little more complicated; it involves writing a preferred content expression. You can do this by first exiting the webapp, and the at the git-annex app's console:
Then when you start the webapp back up, it will get the sheet music and not the raws. Adjust paths in that to suite..
Thank you Joey, The setting should be added to the local, with the remote set to 'full backup'?
I've tried updating that setting to client but it still doesn’t seem to be working. Looking at the log, there is a line 'fatal: not a valid object name refs/remotes/adesktop_annex/annex/direct/master'. Also it appears to have attempted to sync but quit on an invalid FAT file name. Should this stop syncing altogether? Or can it just ignore/report these problem files.
Also thanks for saying how to do part-downloads, I was wandering if it could do that.
I'm also seeing a duplicate parent error at the end of the log.
How can I clear the log? It took quite a while to get this running so there is quite a bit of irreverent stuff in it.
Last log content:
(started...) Already up-to-date. error: duplicate parent c2aa8406693d1a3cdec09fb3be8002865cbc8d36 ignored warning: no threads support, ignoring --threads [2015-02-10 01:44:51 GMT] Pusher: Syncing with adesktop_annex warning: no threads support, ignoring --threads fatal: Unable to create '/home/annex/annex/gc.pid.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. To ssh://annex@git-annex-a-desktop-annex_22_annex/~/annex/ e99e004..5b09ad8 git-annex -> synced/git-annex c2aa840..f64d9e3 annex/direct/master -> synced/master error: Ref refs/heads/synced/git-annex is at 5b09ad85ff8d0ba013e4e135e386818eec0cc810 but expected e99e0040176275beb7553f89774f1b14697fccd8 error: Ref refs/heads/synced/master is at e3482dc007f109d0773cf50fd0de2ca2c213cc24 but expected c2aa8406693d1a3cdec09fb3be8002865cbc8d36 remote: error: failed to lock refs/heads/synced/git-annex remote: error: failed to lock refs/heads/synced/master To ssh://annex@git-annex-a-desktop-annex_22_annex/~/annex/ ! [remote rejected] git-annex -> synced/git-annex (failed to lock) ! [remote rejected] annex/direct/master -> synced/master (failed to lock) error: failed to push some refs to 'ssh://annex@git-annex-a-desktop-annex_22_annex/~/annex/' Already up-to-date. error: duplicate parent e3482dc007f109d0773cf50fd0de2ca2c213cc24 ignored warning: no threads support, ignoring --threads To ssh://annex@git-annex-a-desktop-annex_22_annex/~/annex/ e3482dc..e97d44a annex/direct/master -> synced/master