Linux – Using SVN as backup solution … some doubts

backuplinuxrsyncsvnwindows

I'm starting a new thread (to continue the thread Backup of machines running linux and windows on Mike Renfro suggestion, which I'm grateful to as well as voretaq7).

I think I'm intended to use SVN as a backup solution AND a sync solution (the two of them) for my home directory (let's say photos, proramming source files, documents, etc).
If I put all together I think it would turn something like 300GB, maybe 500GB for future developement (maybe a different repository / subfolder for each of them).

Number of files will be probably HUGE (100'000 or something like that).
I also considered using rsync but it seems to me like it's more to sync than to backup (am I wrong ?).

I have to sync machines running windows AND linux, from netbook to huge desktop, … (the repository will be placed on my home server and syncing to it will make possible to keep a copy of the files on each machine I own).

Here are my doubts / questions:

  • Will SVN be able to hand all of this (well … first checkout will probably take something like a month, but anyway …) ? I mean average sized files (up to 200MB, not planning to do more, I do NOT intend to backup movies or whatever-so-big using SVN). The number of files in the repository may be too much for it ? Alternatives ?
  • If I move / rename a file on the local repository, then do a commit, whan happens ? File gets duplicated (both old an new name), links are created ? What happens if I then checkout on another machine ? Will I get two copies of the same file ? Should I use "svn move" on the local repository of will the "move" command of the OS work anyway ?
  • Same question with delete / a deleted file ?

I'm also open to alternatives, possibly providing versioning, sync and backup features.

Best Answer

Reading your original post and now this one, well, it sounds like you're really complicating things instead of using proven backup techniques as suggested by others. Specifically:

  • Use the tools as they were meant to be be used: SVN for version control for your source files, rsync/amanda/bacula/whatever for your backups with a sensible backup window (5 minutes is not going to happen) like 12 hours or even better 24 hours.

  • Backup to somewhere portable, like a USB drive you can grab in an emergency or better yet, off-site to a DropBox account for all your most important files (which is usually much less on disk than big binaries like movies, software ISOs, music, etc. that can usually be replaced/downloaded again at a later date).

  • Use network drives (redirecting My Documents, setting up mapped drives from the Windows and Samba mounts from the Linux machines) and store your data on your new Linux file server with at least RAID1 configured. Put your money into good Intel GbE NICs and a decent GbE switch and you won't notice any ill effects of working over a network vs. locally (and with RAID1 disk mirroring, you're achieving the real-time sync you're looking for).

This is pretty much "File Server/backup 101" here, but what works for countless SOHO/small businesses should work for you.