- 管理的SVN有很多库,而且SVN大小也很大,这里进行冷备及增量备份;
- 在备份过程中,发现svnadmin hotcopy更适合,原因是svnadmin dump出的备份太大,是SVN源文件的几倍大小,而svnadmin hotcopy备份的数据与SVN的源文件大小差不多;
- 在备份过程中,发现增量备份和全备都是需要的,但是,svnadmin hotcopy在低版本下没有增量备份项,如下面的信息:
- 默认在centos7中安装的是svn1.7版本,没有--incremental 增量备份选项;
[xxx@xxxxx ~]$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[xxx@xxxxx ~]$ yum info subversion
Loaded plugins: fastestmirror
Determining fastest mirrors
* epel: mirrors.bfsu.edu.cn
* remi-safe: mirrors.tuna.tsinghua.edu.cn
zabbix-non-supported 4/4
Installed Packages
Name : subversion
Arch : x86_64
Version : 1.7.14
Release : 14.el7
Size : 4.6 M
Repo : installed
From repo : base
Summary : A Modern Concurrent Version Control System
URL : http://subversion.apache.org/
License : ASL 2.0
Description : Subversion is a concurrent version control system which enables one
: or more users to collaborate in developing and maintaining a
: hierarchy of files and directories while keeping a history of all
: changes. Subversion only stores the differences between versions,
: instead of every complete file. Subversion is intended to be a
: compelling replacement for CVS.
Available Packages
Name : subversion
Arch : i686
Version : 1.7.14
Release : 14.el7
Size : 1.0 M
Repo : base/7/x86_64
Summary : A Modern Concurrent Version Control System
URL : http://subversion.apache.org/
License : ASL 2.0
Description : Subversion is a concurrent version control system which enables one
: or more users to collaborate in developing and maintaining a
: hierarchy of files and directories while keeping a history of all
: changes. Subversion only stores the differences between versions,
: instead of every complete file. Subversion is intended to be a
: compelling replacement for CVS.
[xxx@xxxxx ~]$ svnadmin help hotcopy
hotcopy: usage: svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH
Makes a hot copy of a repository.
Valid options:
--clean-logs : remove redundant Berkeley DB log files
from source repository [Berkeley DB]
[xxx@xxxxx ~]$
- 在centos8的操作系统上,发现了默认安装了高版本;
[xxx@xxxxx ~]# cat /etc/redhat-release
CentOS Linux release 8.0.1905 (Core)
[xxx@xxxxx ~]# yum info subversion
上次元数据过期检查:0:04:57 前,执行于 2020年06月01日 星期一 05时07分53秒。
已安装的软件包
名称 : subversion
版本 : 1.10.2
发布 : 1.module_el8.0.0+45+75bba4f4
架构 : x86_64
大小 : 5.1 M
源 : subversion-1.10.2-1.module_el8.0.0+45+75bba4f4.src.rpm
仓库 : @System
来自仓库 : AppStream
小结 : A Modern Concurrent Version Control System
URL : https://subversion.apache.org/
协议 : ASL 2.0
描述 : Subversion is a concurrent version control system which enables one
: or more users to collaborate in developing and maintaining a
: hierarchy of files and directories while keeping a history of all
: changes. Subversion only stores the differences between versions,
: instead of every complete file. Subversion is intended to be a
: compelling replacement for CVS.
[xxx@xxxxx ~]# svnadmin help hotcopy
hotcopy: usage: svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH
Make a hot copy of a repository.
If --incremental is passed, data which already exists at the destination
is not copied again. Incremental mode is implemented for FSFS repositories.
有效选项:
--clean-logs : 删除源版本库中多余的BDB日志文件 [BDB]
--incremental : 以增量方式进行转存或热复制
-q [--quiet] : no progress (only errors to stderr)
[xxx@xxxxx ~]#
- 官网显示在1.8.4版本,已经有了增量备份incremental选项:
Version 1.8.4
(29 October 2013, from /branches/1.8.x)
http://svn.apache.org/repos/asf/subversion/tags/1.8.4
User-visible changes:
- Client- and server-side bugfixes:
* fix assertion on urls of the form 'file://./' (r1516806)
* stop linking against psapi.dll on Windows (r1534102)
* translation updates for Swedish
- Client-side bugfixes:
* revert: fix problems reverting moves (issue #4436)
* update: fix assertion when file external access is denied (issue #4422)
* merge: reduce network connections for automatic merge (r1468980 et al)
* merge: fix path corruption during reintegration (r1523666)
* mergeinfo: fix crash (r1519955)
* ra_serf: verify the result of xml parsing (r1501199 et al)
* ra_serf: improve error messages during commit (r1526439)
* ra_local: fix error with repository in Windows drive root (r1518184)
* fix crash on windows when piped command is interrupted (r1522892)
* fix crash in the crash handler on windows (r1532023)
* fix assertion when upgrading old working copies (r1520529)
- Server-side bugfixes:
* hotcopy: cleanup unpacked revprops with '--incremental' (r1512300 et al)
* fix OOM on concurrent requests at threaded server start (r1527103 et al)
* fsfs: improve error message when unsupported fsfs format found (r1534158)
* fix memory problem in 3rd party FS module loader (r1519615 et al)
- 使用官网的方案,安装其他源,可以安装SVN其他版本,官网默认安装的svn版本下发提供了其他的版本的安装方法,需要注册(或者百度):(下面的CollabNet或WANdisco,具体连接请找官网。)
Centos Linux
CentOS project (client and server)
$ yum install subversion
$ yum install mod_dav_svn
CollabNet (supported and certified by CollabNet; requires registration)
WANdisco (supported and certified by WANdisco; requires registration)
incremental参考:https://www.cnblogs.com/johnphan/p/9282662.html
官网incremental参考:https://svn.apache.org/repos/asf/subversion/trunk/CHANGES
官网SVN安装参考:http://subversion.apache.org/packages.html
文章制作时间:2020-06-01