I have recently been tasked with implementing version control on our development systems. I created an SVN repository using TortoiseSVN by doing the following:
- Installing the SVN server on the machine storing the code
- Using the repository browser on that machine to import the source code into the repository
Having imported the code, am I right in thinking that there is no longer any need for the code that was stored there? No commits from working copies on other machines seemed to have changed that code, only the svn repository.
I am familiar with the concept that the SVN does not store the raw code simply, but rather the differences. For that reason, my question is: is backing up the SVN repository folder ON IT'S OWN sufficient as a backup strategy for this code?
We do also do a manual backup of the code on the working machine every month as a precaution, and I am considering writing a scheduled batch file to svndump the repository to remote drive daily. If I do the latter, and we, hypothetically, lost both the repository server and the working machine, would we be able to recover the code from this daly svndump?
Hope that makes sense; Thanks in advance.
Backing Up the SVN repository server should be sufficient. One thing to remember is if the working machine goes down you would lose any configurations you have made to the working machine such as server configurations, system variables etc, so make sure those are documented. If you are running in a virtualized environment you can take a backup of the machine image, which would really speed up your recovery time.
As for svndump, That is exactly what it is used for. You can create a new repository and load the dump file and you will have your working code and everything you need.
I would suggest doing a dry run of a recovery using the dump file, that way you will be confident you are creating the dump file correctly and you won't be trying to figure out how to restore the dump file when an actual emergency is occurring.