Home > Software versioning > How to backup svn repository using svnsync and VisualSVN Server on Windows

How to backup svn repository using svnsync and VisualSVN Server on Windows

This guide is for windows (Tested on Windows 7)
Nice guide for linux / unix is available at http://www.thoughtspark.org/node/10

Steps:

  1. Instal VisualSVN Server
    this will also install svn and svnsync command line tools
  2. Create empty repository using VisualSVN Server managment console
    1. righ click on the Repositories
    2. Click Create new repository
    3. Enter repository name (do not check create Create default structure)
  3. Create svn user
    1. Righ click on the users
    2. Click Create users …
    3. Enter username and password
  4. Set permissions
    1. Righ click on repository
    2. Click properties
    3. Set read / write permissions for user
  5. Create empty hook
    1. Righ click on repository
    2. Click properties
    3. Open tab Hooks
    4. Click pre-revision property change hook
    5. Click edit
    6. Insert couple of blank lines
    7. pre-revision property change should be in bold text
    8. Click OK
  6. Initialize repository for svnsync
    1. Open command line (start>run>cmd)
      cd to the VisualSVNServer directory, for example:
    2. In this directory there should be svn.exe, svnsync.exe and similar binaries
    3. run following command:
      svnsync init https://MACHINENAME:8443/svn/project/ http://svn.example.online.repo.com/svn/project

      if needed, you will be asked for username / password

  7. Synchronize
    1. run following command:
      svnsync sync https://MACHINENAME:8443/svn/project/
    2. wait for synchronization to complete 🙂
Advertisements
  1. March 30, 2012 at 9:12 am

    great article thank you very much

  2. eildosa
    September 11, 2012 at 10:26 am

    This was really helpfull, thanks =D

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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: