Practical guide to subversion on Windows with TortoiseSVN

by Nikolai V. Shokhirev

Up: Programming  | Prev: Installation and setup

Contents

 

Introduction

Needles to say that your repository (as any other database) should be backed up on a regular basis. You should consult with the appropriate sections of the SVN Book and TortoiseSVN User Guide.

The simplest way to backup and restore a repository I found in Charlie Calvert's article. Below I just added screenshots for illustration.

 

How to backup and restore a repository

 Suppose 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 backup the repository, you should start the command-line interpreter (Start -> Run -> cmd.exe) and execute the command:
svnadmin dump C:\SVN\MyProject > C:\tmp\MyProject.bak

 This saves all revision in a backup file:

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 (see Repository creation). Then run the following command:
svnadmin load C:\SVN\MyProject < C:\tmp\MyProject.bak

 This restores your repository from the dump file:

You can check the contents of the new repository using TortoiseSVN.

 

References

  1. Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato. Subversion book: http://svnbook.red-bean.com/ 
  2. TortoiseSVN User Guide, which comes with TortoiseSVN.
  3. Charlie Calvert. Using Dump and Load to Backup up Subversion Repositories: http://www.codefez.com/Blogs/tabid/58/ctl/ArticleView/mid/404/articleId/180/Default.aspx

Up: Programming  | Prev: Installation and setup


Rule

Home | Shokhirev.com | Popular Science | Useful and Useless Programs | ABC Tutorials

Please e-mail me at nikolai@shokhirev.com

©Nikolai V. Shokhirev, 2004-2005