Taking dump from svn repositories

10 Dec

Ever faced the situation to take a backup from the svn repository? I faced recently and finally got up with the correct procedure. Here is the complete profile of my experience.

After going inside your remote server by ssh, get into the path where your repository is set and then use the below command to take the dump.

svnadmin dump original_repository_name > dump_name_chosen_by_you

Use . in place of original_repository_name if you are inside the repository itself.

To take the dump of your mysql database present,

Let the username of your mysql be xxx and password be yyy

mysqldump -uxxx -pyyy database_name > dump_name_chosen_by_you.sql

And after taking the dump and the dump file successfully created, there may be a need to compress the dump file and i used tar.gz compression.

tar -zcvf compressed_name_chosen_by_you.tar.gz dump_name_created_before

To compress a full working directory,

tar -zcvf compressed_name_chosen_by_you.tar.gz full_path_of_the_directory

z – use gzip for compression

c – create archive

v – display the progress while doing archive

f – file name of archive

If want to use zip,

zip file_name

Then for taking a copy of  the compressed files from the remote into your local disk,

From your command prompt,

scp user_name_of_remote_server@server_ip:path_of_compressed_file_with_ext .

In my case the extension was tar.gz

And make sure not to miss a dot after the command leaving one space

The file will be copied into the location from where you did the command.

Then to extract the files in your local,

tar -zxvf compressed_archive_name.tar.gz

x- Extract

Leave a comment

Posted by on December 10, 2009 in Subversion(svn)


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: