Subversion (SVN) - Repository Backup and Restore

Subversion (SVN) - Repository Backup and Restore

Created:
2014-02-07 21:48
Recent Updates:
2016-02-19 14:19

Locate "Repository Root"

When installing VisualSVN Server, you must specify the "Repository Root".

Perform the following operations in sequence:
VisualSVN Server - VisualSVN Server (Local) - right click menu - Properties - Storage - Repositories Root
to view the "Repository Root Directory" on the computer where this VisualSVN Server is located.

TonyRemark: This seems to be the decision: it is impossible to have multiple "repository roots" on a single computer at the same time.

Backup/import repository

Backup files by copying

Each "Repository" created by VisualSVN Server has a corresponding folder with the same name in the above "Repository Root Directory". Copy this folder to backup the "Repository".

In daily operations, you can backup all "repositories" by directly copying the entire "repository root directory".

Note: It is mentioned in a lot of web articles that if a process is accessing the repository when copying, an error will occur when restoring or after restoring the copy backup. Tony thinks stopping the "VisualSVNServer" service will avoid this problem.

Large-scale team development, unable to stop the service, or need to synchronize backup, you can use command line tools such as svnadmin for backup operations. Common commands are:

  • svnadmin dump
  • svnadmin hotcopy
  • svnsync

Another: Some netizens said that the easiest way is to install the Collabnet SVN Edge version of the SVN server. The installation and configuration of this SVN server installation package is very worry-free. Basically, it can be used after one installation package. It comes with the SVN server console. The console can be configured to back up the SVN library.

Import "Copyed Backup File"

2014-07-17 After Tony GHOST system, freshly installed VisualSvnServer275 and created User and Group in turn, and then imported the original repository one by one according to the following steps, one success:
VisualSVN Server - VisualSVN Server (Local) - Repositories - right click menu - all task - Import Existing Repository is exactly the same as the number  of   files, folders, and size
after importing  .D:\RepositoriesD:\Repositories_Old

Backup/Import Repository - Test Record

In VisualSVN Server's "Repositories Root" directory (usually  "D:\Repositories"), in addition to the following three files, there will be N "repositories folders" corresponding to each repository. 2016-02-19 Copy all "Library Folders" on D230S to FtnDwjPc, then set group and user in "VisualSVN Server - Left Navigation Bar - Library Name - Right Click - All Tasks - Manage Security..." It is the value of the machine (if not set, the permission error is reported due to the different settings on D230S and FtnDwjPc), and it can be used normally.

  • "D:\Repositories\VisualSVN-GlobalWinAuthz.ini"
  • "D:\Repositories\groups.conf"
  • "D:\Repositories\htpasswd"

Resource

  1. Lossless migration and automatic backup of SVN repository
  2. SVN backup
  3. SVN backup strategy
  4. Detailed explanation of SVN database migration and backup methods
  5. SVN Migration and Backup

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326612020&siteId=291194637