
将windows上svn迁移到linux上
进入conf目录
authz :负责test3库的账号权限管理,控制账号是否读写权限
passwd :负责test3库的账号和密码管理,注意密码是明文的
svnserve.conf :svn服务器配置文件
示例:
启动:
端口:3690 注意打开防火墙
访问:
svn://192.168.1.206:3690/test3
用mod_dav_svn模块实现Apache服务进行访问svn仓库,mod_dav_svn是Apache和svn之间的接口
SVNParentPath /svn/svndir
指如果有多个版本库建议使用SVNParentPath不使用SVNPath,/svn/svndir 版本库位置
AuthUserFile /svn/svndir/passwd
指后面使用apache的htpasswd创建的用户名密码
AuthzSVNAccessFile /svn/svndir/authz
指权限文件
创建用户并设置密码
此时可以通过
http://192.168.1.206/svn/test3
在浏览器中输入用户名密码访问
直接将windows下Repositories目录下的数据打包迁移到linux下的Repositories即可访问,但是用户名和密码不可以迁移,需要重建
1 注意权限为问题,如果/svn/svndir属主不是apache,会一直访问拒绝访问
2 svn协助与http协议
svn协议,用于客户端使用svn://方式访问版本库,而mod_authz_svn模块让客户端可通过Apache访问版本库,它们分别使用不同的服务:svnserve、httpd进行访问。由于用户、组权限不同,权限管理方式也不相同,因此,不建议同时启动两种访问方式。
而易用性,管理方便的角度来分析,Apache以,mod_authz_svn模块的方式访问版本库会更多人选择。(mod_authz_svn方式,使用80端口访问,并且提供https等加密传输,用于用户信息验证的密码保存方式不是明文的)
方法一,要求linux下的svn版本比windows的一致或者更高,然后直接将仓库复制过去,检查一下可用即可。这个最快。 方法二,用svnadmin dump和svnadmin load命令。 方法三,用svnsync命令,可以热备份Moving a subversion repository from one server to another, while still preserving all your version history may seam like a daunting task, but fortunately it's not too difficult.I recently had to move a subversion (svn) repository to another server. The repository was on a Windows server and had to be moved to a Linux server.
Step 1: Backup your old Repository
The first thing you need when moving from one server to another is a dump of your subversion repository. Hopefully you are already creating dump's with a backup script, but if not here's how you can create a subversion dump file:
svnadmin dump /path/to/repository >repo_name.svn_dump
The dump file contains all the revisions you have ever made to your svn repository, so it will probably be quite large (it even includes files you may have deleted in a previous revision).
Step 2: Create the new Repository
Now, simply transfer the dump file on to your new subversion server, and create an empty repository:
svnadmin create /path/to/repository
Step 3: Import your old repository into the new one
Next import your dump file:
svnadmin load /path/to/repository <repo_name.svn_dump
You may want to force subversion to use the same UUID for the new repository as the old repository. To do this add --force-uuid to yoursvnadmin load command. In my case I wanted to do this. If you have already loaded your repository, there is a way to set the UUID at a later date, check the docs.
That's it, you now have a replica of your old repository on your new server.
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)