Archive

Posts Tagged ‘svnsync’

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

January 2, 2011 2 comments

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