Rename a SVN Repository


Rename a SVN Repository

Howto: Rename a SVN Repository

SVN is the most commonly used version control system used these days.

One of the things that you might require in your SVN is to rename a SVN repository.

By default SVN doesn’t provide with an option to rename an existing SVN repository.

Rename a SVN Repository

The method that we will be followig here is to backup the existing repository using svnadmin dump, create a new empty repository using svnadmin create and then restore the backup to the new repository using svnadmin load.

Let’s assume that the existing repository is OLD_REPO and the new name for the repository is NEW_REPO.

Backup SVN Repository

So first, let’s backup the existing repository and it’s data using svnadmin dump:

[[email protected] ~]# svnadmin dump /the/path/to/repositories/OLD_REPO > OLD_REPO.dump

So we have the repo OLD_REPO backed up in the dump file OLD_REPO.dump.

Create a new SVN Repository

Now, let’s create a new SVN using svnadmin create:

[[email protected] ~]# svnadmin create /the/path/to/repositories/NEW_REPO

So we now have a empty repository present with the default structure.

Restore the SVN Repository

Now, restore the data for the previous repository into the new repository created using svnadmin load:

[[email protected] ~]# svnadmin load /the/path/to/repositories/NEW_REPO < OLD_REPO.dump

That should do it. The data for OLD_REPO should now be present in the newly created SVN repo, NEW_REPO.

Set proper access for the SVN Repository

Verify that the new SVN repository is having proper user, system permissions & commit hooks.

This will including the renaming for the repository name with the user access defined.

Some webservers run SVN with webserver user (www or apache or nobody) as the owner for the repositories. You will have to ensure they are set right.

And finally ensure the commit hooks (pre & post) are set correctly.

No Comments

Post a Comment

Time limit is exhausted. Please reload CAPTCHA.