简体   繁体   English

备份collabnet subversion到另一个硬盘边缘

[英]backup collabnet subversion edge to another hard disk

I've installed Collabnet Subversion Edge, and would like to make sure I have it backed up properly. 我已经安装了Collabnet Subversion Edge,并且希望确保我正确备份它。 I would like NOT to use the CloudBackup service offered. 我不想使用提供的CloudBackup服务。

I've went to the administration interface for collabnet (localhost:3343) and went to Repositories > Backup Schedule. 我去了collabnet的管理界面(localhost:3343)并转到了存储库>备份计划。 There, one can choose between 3 different 'Type of Job': 在那里,人们可以选择3种不同的“工作类型”:

  • Cloud Services Backup 云服务备份
  • Full Dump Backup 完全转储备份
  • Hotcopy Backup Hotcopy备份

Neither lets you choose where to copy the backup. 您也不能选择复制备份的位置。 I've tried looking up how this works, but documentation seems to be lacking a lot. 我试着查看它是如何工作的,但文档似乎缺乏很多。

What is the best way to backup such a repository? 备份此类存储库的最佳方法是什么? Shall I just keep a copy of the entire collabnet folder (c:\\csvn)? 我应该保留整个collabnet文件夹的副本(c:\\ csvn)吗?

The Subversion Edge admin UI lets you specify the folder for backups. Subversion Edge管理UI允许您指定备份文件夹。 It defaults to a folder inside the normal data folder, but you can specify a different value. 它默认为普通数据文件夹中的文件夹,但您可以指定其他值。 So, for example, if you have a D:\\ drive that you want the backups to go on you can just specify that folder in the settings and the backups will go to that folder. 因此,例如,如果您希望备份继续使用D:\\驱动器,则可以在设置中指定该文件夹,备份将转到该文件夹​​。

It does need to be a physically accessible hard drive though. 它确实需要是一个物理可访问的硬盘驱动器。

See the Backup Directory configuration item in this screenshot: 请参阅此屏幕截图中的备份目录配置项:

https://ctf.open.collab.net/sf/projects/svnedge/screenshots/screens/config/config.png https://ctf.open.collab.net/sf/projects/svnedge/screenshots/screens/config/config.png

更改备份路径

You can use Windows Server Backup to backup Subversion repositories. 您可以使用Windows Server Backup来备份Subversion存储库。 It allows you to shedule backups to a network share, dedicated backup volume, writeable media. 它允许您将备份分配到网络共享,专用备份卷,可写介质。 For example, wbadmin command-line tool allows you to safely backup your repositories. 例如, wbadmin命令行工具允许您安全地备份存储库。 This simple command performs one-time copy backup of C:\\foo\\bar to X:\\ volume: 这个简单的命令执行C:\\foo\\bar的一次性副本备份到X:\\ volume:

wbadmin start backup –backupTarget:x: -include:c\foo\bar -vsscopy

(To install Windows Server Backup, run ocsetup WindowsServerBackup in elevated command-prompt). (要安装Windows Server Backup, ocsetup WindowsServerBackup在提升的命令提示符下运行ocsetup WindowsServerBackup )。

You can setup backup in different ways: 您可以通过不同方式设置备份:

It's not required to stop server's service when you run the backup because FSFS repository backend is always in consistent state . 运行备份时不需要停止服务器的服务,因为FSFS存储库后端始终处于一致状态

Here are general tips about recovering Subversion repository from a backup: 以下是从备份恢复Subversion存储库的一般提示:

  1. Recover repository backup to an empty directory to make sure that restored repository files won't mix with files of the broken one. 将存储库备份恢复到空目录,以确保已还原的存储库文件不会与已损坏的存储库文件混合。 After repository if recovered, you can delete broken repository and then replace it with the recovered one. 在存储库恢复后,您可以删除损坏的存储库,然后将其替换为已恢复的存储库。

  2. Stop-start cycle your Subversion server after recovering repository from a backup. 从备份恢复存储库后,停止启动Subversion服务器。

  3. If your clients get errors after repository recover, run svnadmin recover against it. 如果您的客户端在存储库恢复后出现错误,请对其执行svnadmin recover The command finishes instantly and makes repository accessible again. 该命令立即完成并使存储库再次可访问。

如果您可以访问存储库目录,那么您应该能够直接使用hotcopy并指定备份的位置。

It's enough to take a periodical backup of just csvn/data directory where all your repositories and configuration files are stored. 仅对csvn / data目录进行定期备份就足够了,其中存储了所有存储库和配置文件。

Visit this link for backup (and upgrade) options. 访问此链接以获取备份(和升级)选项。 The contents in the link is added below. 链接中的内容将在下面添加。 Hope it helps. 希望能帮助到你。

Manual Upgrade/Reinstallation Steps 手动升级/重新安装步骤

Subversion Edge includes an integrated mechanism for installing updates. Subversion Edge包含用于安装更新的集成机制。 This is the preferred way to do an upgrade as it handles whatever steps are needed to perform the upgrade and can be done remotely from your web browser. 这是进行升级的首选方式,因为它可以处理执行升级所需的任何步骤,并且可以通过Web浏览器远程完成。 However, there are scenarios where you might want or need to do an upgrade manually, for example your Subversion Edge server might not be able to access the Internet to pull down the updates or maybe one or more critical installation files have become corrupted and you need to reinstall using the same version. 但是,有些情况下您可能需要或需要手动进行升级,例如Subversion Edge服务器可能无法访问Internet以下拉更新,或者一个或多个关键安装文件可能已损坏且您需要使用相同的版本重新安装。 Here are the steps for performing a manual upgrade or reinstallation: 以下是执行手动升级或重新安装的步骤:

Windows 视窗

If your existing Subversion Edge installation was installed using the installer from Subversion Edge 2.0.0 or later, then all you need to do to upgrade is download the latest installer and run it. 如果使用Subversion Edge 2.0.0或更高版本的安装程序安装现有的Subversion Edge安装,则升级所需的只是下载最新的安装程序并运行它。 This will uninstall the current version and install the new version (which is how the Windows Installer (.msi) process works for upgrades). 这将卸载当前版本并安装新版本(这是Windows Installer(.msi)进程用于升级的方式)。 If you are not sure what version you installed with, you can always safely use this approach: 如果您不确定安装的版本,可以随时安全地使用此方法:

  • Stop the existing services and uninstall the current version from the Windows Control Panel. 停止现有服务并从Windows控制面板卸载当前版本。 This will leave behind your C:\\csvn folder and any files in it that have been modified since the original install. 这将留下您的C:\\ csvn文件夹及其中自原始安装以来已修改的任何文件。
  • Delete everything in the C:\\csvn folder EXCEPT the data folder. 删除C:\\ csvn文件夹中的所有内容除了数据文件夹。 So you should be left with just the C:\\csvn\\data folder. 所以你应该只剩下C:\\ csvn \\ data文件夹。
  • Install the new version. 安装新版本。 The installer will pick up the existing data folder and when the services start it will basically just be an upgrade to the new version. 安装程序将获取现有的数据文件夹,当服务启动时,它基本上只是升级到新版本。

WARNING: Take note of this reported bug and backup the svn_access_file first: artf7081 - Using Windows installer for updates can overwrite the svn_access_file 警告:记下此报告的错误并首先备份svn_access_file:artf7081 - 使用Windows安装程序进行更新可能会覆盖svn_access_file

Linux/Solaris Linux / Solaris上

To upgrade a Linux/Solaris installation, this is the safest way to do it: 要升级Linux / Solaris安装,这是最安全的方法:

  1. Stop the servers $ bin/csvn stop $ bin/csvn-httpd stop 停止服务器$ bin/csvn stop $ bin/csvn-httpd stop
  2. Rename the csvn folder $ mv csvn csvn-old 重命名csvn文件夹$ mv csvn csvn-old
  3. Untar the new release as a non-root user 以非root用户身份解压新版本
  4. Move the data folder back into the new release $ mv csvn-old/data csvn 将数据文件夹移回新版本$ mv csvn-old/data csvn
  5. Important! 重要! Copy "dist" configuration files to data folder $ cp -f csvn/dist/*.dist csvn/data/conf 将“dist”配置文件复制到数据文件夹$ cp -f csvn/dist/*.dist csvn/data/conf
  6. Start the servers $ bin/csvn start $ bin/csvn-httpd start 启动服务器$ bin/csvn start $ bin/csvn-httpd start

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM