1. Home
  2. Knowledge Base
  3. Network
  4. NAS
  5. Backup your SVN Repository on a Synology NAS

Backup your SVN Repository on a Synology NAS

Preparation

First of all you need to enable the “SSH” for your Synology NAS. To do so, login to your dashboard, open the Control Panel and navigate to “Terminal & SMNP”. There, check the tick saying “Enable SSH service”, that’s it.

Now use any SSH Client to connect to your Synology. We recommend putty for that. You can download it for free below.

Download Putty: Download page

Connect

Run your SSH Client tool and connect to your IP address of your local Synology NAS.

If you have enabled the root user for your Synology, login directly with “root” and your password. If not, please follow the steps below.

Login with your admin credentials first. It’s the same as you use for your dashboard login.

login as admin

Afterwards, type in following command to get down the the root level. You will be asked again for your password. Use your admin password.

sudo -i
get root access for your Synology NAS

Now you are logged in as root. Please note that this step is necessary, otherwise you have no access to the repository later.

Backup your repository

Now you can create a dump of your repository with following lines.

cd /volume1/

First of all we change the directory to the volume1 (this can differ from your setup, just use the target volume of your local NAS.

svnadmin dump SVN/YOUR_REPO_TO_BACKUP > Backups/MyBackup.svndump

Then we dump the target repo to our backup folder on your NAS. The filename can be anything.

The backup in progress. This can take awhile depending on your repo size.

Restore your Repository

In order to load your repository backu file (dump) into your existing repo, please run following command as root.

svnadmin load SVN/YOUR_REPOSITORY < Backups/MyBackup.svndump

This will overwerite the existing data in your repository! Be absolutely sure about what you do!

If you want to restore it in a brand new repo, create one with this command, before.

svnadmin create MY_REPOSITORY
Updated on September 15, 2019
Was this article helpful?
Not the solution you were looking for?
Click the link below to submit a support ticket
Visist our Forum!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.