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
- Log into your server via SSH.
- Navigate to the directory you wish to create the backup in. This article creates it in your user's home directory.
[server]$ cd ~
- 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
- 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.