SVN脚本备份与恢复的方案

脚本备份与恢复的方案

#add for SVN 添加环境变量

exportPATH=/svn/csvn/bin:$PATH

范例脚本:

在需要备份的机器上:如(内网服务器10.50.2.54

svnlook youngest/svn/csvn/data/repositories/FTSSvn

svnadmin dump -r30 svn/csvn/data/repositories/FTSSvn >/svn/svnbackup/ FTSSvn_full.20141126

svnadmin dump--incremental -r 31:43 svn/csvn/data/repositories/FTSSvn >/svn/svnbackup/ FTSSvn_full.20141127

把备份的文件FTSSvn_full.20141126FTSSvn_full.20141127拷贝到如(koala外网服务器下的)/koala/svnbackup

cd/koala/svn/csvn/data/repositories

mkdir FTSSvn

svnadmin createFTSSvn

svnadmin loadFTSSvn

svnadmin loadFTSSvn

此时在控制台无法显示,需要执行以下discover操作

Connect an existing repository

To start managing your existingrepositories with the web interface, you need to first make SubversionEdge aware of their location.

There aretwo ways to connect an existing repository:

  • Provide the path to your repository while configuring CollabNet Subversion Edge.
  • Move your repository to the default parent directory location.
  1. Depending on how you choose to connect your repositories, do one of the following:
    • In the main navigation bar, select Administration. In the Server Settings page, provide the path to your repositories in the Repository Directory field.
    • Manually move your repositories into the default parent repository directory - /data/repositories in the location where you installed CollabNetSubversion.
  2. Select Repositories in the main navigation bar and click Discover.

Your existingrepositories are listed. When you visit this page for the first time after arepository is discovered, you might see a message about fixing repositorypermissions on a Linux system. Subversion Edge requires thatrepository files and directories be writable, which may not be the case withimported repositories.

  1. If filesystem permission changes are required, do the following:
    1. Select the repository and click Info. You'll see an example of the command for the fix.
    2. Apply the fix and click Validate Permissions.

你可能感兴趣的:(项目配置管理)