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 </koala/svnbackup/FTSSvn_full.20141126

svnadmin loadFTSSvn </koala/svnbackup/FTSSvn_full.20141127

此时在控制台无法显示,需要执行以下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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值