Restore SVN from Backup

06 Oct

First of all ,

Create the Repository (don’t import any of your working copies or anything.. just the clean repository).

to Create a Repository issue the below command.

svnadmin create –fs-type fsfs /srv/svn/repos

if your Svn Backup is saved in .tgz format i.e., backup.tgz then unzip it first using the command

tar -xvzf filename.gz

for ex: tar -xvzf 030001.tgz will unzip the file in your given location with a dumpfile as saved previously by the command script.

then run the below script to restore the Repository from Backup.

svnadmin load <

ex: #svnadmin load /srv/svn/repos < /home/sree/Desktop/030001/dumpfile.txt

then the dumping process will start and dump all the revisions inside the Selected Folder.

check your repository before updating or committing any of your new files.

here are some of the external bash commands if you need for your directory removal with some content in it.

ex: rm -rf repos (will delete main folder and sub folders inside)

if you have any issues please leave a comment.

to set the Cron Job for SVN use the below commands

#crontab -l will list out all the cron jobs

#crontab -e    will edit the cron job file in VI Editor.

0 3 * * * /srv/svn/backup/

will do incremental backups everyday.

this is the Reference URL


Leave a comment

Posted by on October 6, 2009 in linux, subversion


Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: