forum/Using git annex with a SMB/FTP TV NAS with preconfigured dirsgit-annexhttp://git-annex.branchable.com/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/git-annexikiwiki2013-11-27T22:47:37ZSimilar to "direct special remotes"http://git-annex.branchable.com/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_1_bd73c8d10028e1b45da9ea8f657e5064/Chris Stork2013-11-27T22:47:37Z2013-08-16T17:57:26Z
<p>You have a very similar problem as I do.</p>
<p>See my post where I called this <a href="http://git-annex.branchable.com/forum/Direct_special_remotes/">direct special remotes</a>.</p>
Except I don't have rsync/sftp on the NAS AFAICThttp://git-annex.branchable.com/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_2_16c3c994ee8fcb466e52ca0e812e5915/obergix2013-11-27T22:47:37Z2013-08-17T08:56:37Z
There seemed to be some hope with rsync in your case, but not mine. Thanks anyway for the pointer.
Experimenting with a CIFS mount point of the NAS and direct modehttp://git-annex.branchable.com/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_3_ac60f6edb76bdd541711e472eec9591a/obergix2013-11-27T22:47:37Z2013-08-17T22:11:19Z
<p>I've been experimenting with a direct mode repo on a CIFS mount of the SMB share of the NAS.</p>
<p>Unfortunately, it seems I can't propagate changes made on the laptop to the mount point by issueing a git pull or merge, as it is part of the unsafe commands that don't support direct mode (see details in <a href="http://git-annex.branchable.com/direct_mode/#comment-fca93776b9526341e6aae4fe2c53038c">http://git-annex.branchable.com/direct_mode/#comment-fca93776b9526341e6aae4fe2c53038c</a>)... direct mode wouldn't be very useful then : I intend to mirror on the NAS the files I've been managing locally. For instance I will sort my photos in subdirs, on the laptop, and intend to mirror that on the NAS.</p>
comment 4http://git-annex.branchable.com/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_4_2194f0600d9a90f0d9c947ea9cc213a3/joeyh.name2013-11-27T22:47:37Z2013-08-23T17:55:39Z
Just run <code>git annex sync</code> to update the direct mode repository on your NAS.
So it seems I have found a sequence that seems to be operating finehttp://git-annex.branchable.com/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_5_eb7d13f6b6fa674a2536bde51bfc3fd1/obergix2013-11-27T22:47:37Z2013-08-23T20:28:45Z
<p>Here's a script, which I think makes it work, using git clone, git annex copy and git annex sync :
# The "master" remote which is with default indirect mode, on a Linux FS
BASE1=~/tmp
REPO1=$BASE1/annex-test</p>
<pre><code># The "slave" remote on the NAS (a Samba server), which has been mounted with cifs, and thus will be in direct mode
BASE2=/mnt/freebox-server/
REPO2=$BASE2/annex-test
cd $BASE1
mkdir $REPO1
cd $REPO1
git init
git annex init "my laptop"
cd $REPO1
cp -Lr ~/some_large_files ./
git annex add some_large_files
git commit -m "added"
cd $BASE2
git clone $REPO1 $REPO2
cd $REPO2
git annex init "freebox server"
# This is not really needed, but if you want to replicate on a non cifs mount
git annex direct
cd $REPO1
git remote add freebox-server $REPO2
git annex copy --to freebox-server
git annex sync
cd $REPO2
git remote add laptop $REPO1
#git annex sync
</code></pre>
<p>After this, you should have your .git and plain "direct" files on the NAS, mirrored from what's on the laptop.</p>
<p>Hope this helps.</p>
comment 6http://git-annex.branchable.com/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_6_ae323b16ddb9342e91be955408eca3b1/joeyh.name2013-11-27T22:47:37Z2013-08-24T15:58:28Z
You can run any of these operations in any order and it will work. Ie, this is far more complicated and detailed than it needs to be. Just run git-annex commands in any order to do what you want to do. If they don't, file a (detailed) bug report.