简体   繁体   English

将svnadmin dump的输出重定向到另一台服务器

[英]Redirecting the output of svnadmin dump to another server

I currently have a SVN repository on a server that is low in available disk space. 我目前在服务器上的SVN存储库中可用磁盘空间不足。 I thus would like to migrate this SVN repository to a new server. 因此,我想将此SVN存储库迁移到新服务器。 Usually I would use the following command: 通常我会使用以下命令:

svnadmin dump /path/to/somerepository > somerepository.svn.backup

However, as mentioned above, I am very low on disk space and I would like to store the dump of my new server by streaming the stdout of the svnadmin dump process to the new server. 但是,如上所述,我的磁盘空间非常低,我想通过将svnadmin dump过程的stdout流式传输到新服务器来存储新服务器的svnadmin dump What would be the best way to do this? 最好的方法是什么?

Use a couple of netcat commands to "stream" the dump away: 使用几个netcat命令来“转储”转储:

old server: start netcat in server mode, piped to svnadmin 旧服务器:以服务器模式启动netcat,通过管道传输到svnadmin

svnadmin dump /path/to/somerepository | nc -q 10 -l -p 6666

new server: connect to other netcat instance and save stream on file 新服务器:连接到其他netcat实例并将流保存在文件中

nc -w 10 oldserver 6666 > somerepository.svn.backup

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

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