You can use the subversion dump and load commands to perform simple backups and restores of your repository.

To back up a subversion repository, issue the following command:

svnadmin dump /usr/local/MyRepository > /home/charlie/svnBackupFile

Here you pass the dump command to the svnadmin utility. As a parameter, you pass in the name of the repository you want to backup. I then redirect that backup to a file.

To restore the repository from the dump file, you should first create a new repository to hold the data you want to restore:

svnadmin create /home/charlie/foo/bat

To restore the data, enter this command:

svnadmin load /home/charlie/foo/bar < /home/charlie/svnBackupFile

When the repository is restored, you can use the standard command line commands to check files out from it:

svn --username MyName --password MyPassword co svn://home/charlie/foo/bar/CodeFez

0 comments: