Backing up your SVN repository

This article explains how to create a backup of your SVN repository. The following is assumed for all command examples:

  • Your repository is named SVN_Test
  • The repository is located in your /home/username/svn/ directory

Creating a dump file of your repository

  1. Log into your server via SSH.
  2. Navigate to the directory you wish to create the backup in. This article creates it in your user's home directory.
    [server]$ cd ~
  3. Run the following to create a dump file of your SVN repository. This command then compresses it and allows you to give the backup file a new name.
    [server]$ svnadmin dump ~/svn/SVN_Test | gzip -9 > SVN_Test_backup.dump.gz
  4. You can now see the backed up .gz file in your user's home directory.
    [server]$ ls -la ~ | grep .gz
    SVN_Test_backup.dump.gz

You can now load the backed up repository onto a new server.

See also

Did this article answer your questions?

Article last updated .