1

I have a shared hosting account, and I just started using source control locally (TortoiseSVN) for my personal projects. I'd like to keep the repositories backed up elsewhere, so I'm wondering if as a practice it's a good idea to upload all modified repositories to the shared server at the end of the day.

That said, if there is an easier or more secure way to back them up, I'd appreciate your input.

Voriki
  • 1,617
  • 2
  • 19
  • 43

2 Answers2

2

Daily backups are definitely a good idea! For Subversion, you should use svnadmin to create a dump file, and then make a backup of that:

svnadmin dump repositorypath > backupname.svn

Using svnadmin ensures that you get a consistent snapshot of your repository. Merely copying the repository directly can lead to an inconsistent backup — one that you cannot restore! See this SO question for much more advice on this problem.

Community
  • 1
  • 1
Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
0

It's indeed a good idea to have a backup. The alternative is to use Google Code, SourceForge, GitHub or any other online source control service to host your source code. I'd hope that they are doing backups, and you would have the additional advantage that your repository is available from anywhere.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
  • Using any of those sites means your code will be open for public (as long as you're using their free solutions). – Kolky Jan 12 '12 at 08:28