Miscellaneouss

How to Backup and Restore a Repository on Windows with TortoiseSVN

In this article I will show how to take backup and restore your svn repository. Needles to say that your repository (as any other database) should be backed up on a regular basis.

How to backup and restore a repository

For Example your repository is in C:\SVN\MyProject. You want to save it contents in C:\tmp\MyProject.bak (file extension does not matter). We are going to use the tool svnadmin, which comes with Subversion.

1. To take backup of repository you will need to start the command line interpreter (Start -> Run -> cmd.exe) and execute the command:

svnadmin dump C:\SVN\MyProject > C:\tmp\MyProject.bak

svn-repository-backup

This saves all revision in a backup file:

svn-repository-backup-2

2. To restore the repository from the dump file, you should first create a new repository (e.g. C:\SVN\MyProject2) to hold the data you want to restore. Then run the following command:

svnadmin load C:\SVN\MyProject < C:\tmp\MyProject.bak

svn-repository-restore

This restores your repository from the dump file:

svn-repository-restore-2

Now you can check the contents of the new repository using TortoiseSVN.

Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment