Using Subversion with DropBox

SvnXcodeBackupDropbox

Svn Problem Overview


Is it a bad idea to use DropBox as a backup system for Subversion repositories?

Has anyone tried using Subversion with an an online file sharing utility like DropBox? What's your experiences?

My concern is whether this will work - mainly because Subversion maintains locks and it's very specific about it. I'm not sure if DropBox and Subversion can both work together?

p.s. I'm thinking of using this for my Xcode projects, and no, i don't want to use github because it's not free - you can't keep your repositories Private with the free account (and other reasons).


References:

DropBox (file sync, sharing, and online backup)

Subversion (open source version control system)

Svn Solutions


Solution 1 - Svn

I've got Dropbox, SVN and Xcode working fine here, I've had no problems what so ever.

You don't even need to be careful about which machine you commit/update from as Dropbox keeps EVERYTHING synchronised.

Solution 2 - Svn

My suggestion is to use dropbox together with an encryption tool such as TrueCrypt. In this way you would have a safe storage on the cloud.

SVN works perfectly in a TrueCrypt disk.

If you need to access the repository at the same time on multiple location I would recommend of using a subversion host provider. DropBox can get confused if two persons are modifying the same file at once.

http://wiki.dropbox.com/TipsAndTricks/IncreasePrivacyAndSafety

http://www.randomwire.com/storing-sensitive-data-in-the-cloud

Solution 3 - Svn

Why to use SVN inside Dropbox? Instead, you can use your own SVN server with Dropbox-like interface: EasySVN from Assembla or IQBox-SVN.

Solution 4 - Svn

May be this will help you. I have put SVN Reposiroty inside of a Dropbox Folder. http://foyzulkarim.blogspot.com/2012/12/dropbox-as-svn-repository.html

Solution 5 - Svn

You can simply exclude the .svn-Folder from Dropbox: (instructions for Mac)

  1. You need to see the .svn-Folder, so go into Terminal and execute

    defaults write com.apple.Finder AppleShowAllFiles YES
    killall Finder
    
  2. Go to your Folder an Copy the .svn-Folder somewhere else

  3. Go to your Dropbox-Preferences > Advanced > Selective Sync and deactivate to .svn-Folder

  4. The Folder should now be deleted from your HD and Dropbox, you can check that on the website.

  5. Put your copy of the .svn-Folder back into the directory. You should see a little gray sign like (-)

  6. Revert step 1 with

    defaults write com.apple.Finder AppleShowAllFiles NO
    killall Finder
    
  7. That's it!

Solution 6 - Svn

I think it will probably work out OK if you're not accessing the repository from different locations, and let is synchronize before using it. It doesn't seem like a very stable solution though.

Is there any reason you can't us a publicly available URL for your repository?

Solution 7 - Svn

Depending on how many files you are syncing it may end up doing a lot of file transferring. (Remember, you only have 200MB on Dropbox without any additional storage bonuses on the free account.) This means all the .svn (or _svn) files will also be synced, in effect doubling the amount of files it needs to keep updated.

If you don't need to move whole directories around in your tree once the initial sync is complete, then transfers should be respectable.

I've tried this myself for some projects and it worked okay, but in the end I think the best way to use Subversion repositories and Dropbox together is to use them for deployment builds. I wouldn't just set Dropbox to sync with my working folder. Use Dropbox to sync up at the end of the day by copying in the working folder to the actual Dropbox folder at scheduled intervals, thereby limiting the amount of constant network traffic the former might incur.

Solution 8 - Svn

i got problems when use Dropbox to sync svn repository, once Dropbox failed to access one file, the file doesn't be synced again. then, the svn structure was been destroyed...

Solution 9 - Svn

See [SVN Backups to Dropbox][1]. This generates full or incremental dumps of the SVN repository and uploads the compressed result to Dropbox. The main advantage of this approach is that it does NOT use the Dropbox client software. The Dropbox client software synchronizes between your computer and the cloud, and a corrupted file would be synchronized. You can create a cronjob (or Windows scheduled task) to run this script every day/week/month/etc.

[1]: https://github.com/dhadka/SVN-Backups "SVN Backups to Dropbox"

Solution 10 - Svn

Not the trivial way...

First idea is always "okay, let's keep the repo on Dropbox and it will do the rest". Nope. This combo will always give you locking problems, just as you expected. I tried because I love svn's simplicity but I ended up moving some of my repos to git, just to make the sync flawless.

Now I'm still not a git fan (after a few years of inevitable use because of my clients' version control choices) so here's a few ideas to not do what I did:

What you can do instead

  1. RiouxSVN
    There's a very good (and surprisingly, free) svn hosting service: https://riouxsvn.com/ - it's a no-nonsense way to keep your repos somewhere safe, physically detached from your computer, available anywhere as long as you have a connection. So basically, what I guess you wanted to achieve with DropBox.

  2. Post-commit
    You can easily create a post-commit batch that copies your local repository to DropBox. Make it a differential mirror, a built-in tool called robocopy can take care of that for you. This way you'll always have a safe instance in the sky.

  3. Distract DropBox sync
    This is merely a dirty trick if nothing else seems to work - a pre-commit hook with a big file copy, to cause a noticeable delay for DropBox and prevent simultaneous opening of the same files svn are working on. Not recommended if you have a better option.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMustafaView Question on Stackoverflow
Solution 1 - SvnJamesView Answer on Stackoverflow
Solution 2 - SvndawezView Answer on Stackoverflow
Solution 3 - SvnniutechView Answer on Stackoverflow
Solution 4 - SvnFoyzul KarimView Answer on Stackoverflow
Solution 5 - SvnJannik ArndtView Answer on Stackoverflow
Solution 6 - SvnSander RijkenView Answer on Stackoverflow
Solution 7 - SvnNeil MonroeView Answer on Stackoverflow
Solution 8 - SvnCooper.WuView Answer on Stackoverflow
Solution 9 - Svnuser2218052View Answer on Stackoverflow
Solution 10 - SvndkellnerView Answer on Stackoverflow