- 论坛徽章:
- 0
|
原文出自howtoforge,本人只是翻译过来供大家参考,如有纰漏,敬请指正。
Use SSHFS With rdiff-backup
通过SSHFS使用rdiff-backup
An excellent tool to create backups is rdiff-backup. It is based on SSH, and the feature of SSH to execute a command on a remote system, as long as you can log in to this machine with SSH.
rdiff-backup是一个十分优秀的备份工具,它是基于SSH,通过SSH的特性在远程主机上执行程序,前提是你可以通过SSH登录主机
Now I've been experimenting with SSHFS, and one of the things it can be used for is rdiff-Backup. Sshfs is a FUSE module, which allows you to mount the remote system. A normal backup looks like (assuming ssh access is ok):
现在我们尝试一下SSHFS,可以是rdiff-backup一起工作,SSHFS是FUSE的一个模块,允许挂载远程主机的系统,通常的备份形式如下(ssh访问正常):
<!--
document.write('<div align="center">');
//-->rdiff-backup --preserve-numerical-ids 192.168.0.10::/home/sbon /srv/rdiff/backup/192.168.0.10/home/sbon
Now with SSHFS it looks like:
在SSHFS下实现相同功能需要如下步骤:
install --directory /srv/rdiff/mounts/192.168.0.10
sshfs -o ro 192.168.0.10:/ /srv/rdiff/mounts/192.168.0.10
rdiff-backup --preserve-numerical-ids /srv/rdiff/mounts/192.168.0.10/home/sbon /srv/rdiff/backup/192.168.0.10/home/sbon
It looks like this construction has only advantages:
这种构架有如下的好处:
the backup process is slightly faster. I've done some testing and all of my cases the backup over sshfs was a little bit faster (5 a 10 %).
备份程序执行更快。我的测试表明通过SSHFS可以提高速度5%到10%。
- with sshfs it is possible to mount the remote system read-only, which increases the security. This is not an optimal security measurement: this readonly flag should not be controlled on this system (where the backup is made) , but on the remote system. I've tried to find out how, but there is no way in the Ssh server to make access read-only. Somebody knowing a way to do it, please let me know.
通过SSHFS可以将远程系统按照只读的方式挂载。增加安全性。但并非最优的安全特性。只读标记在本地主机上没有作用(备份期间),只作用在远程主机上。我试图找到原因,但是在SSH服务器中没有设定只读的选项。如果有人知道,请告知。
- it is possible to make more than one backup using only one SSHFS mount. When all backups are done, the sshfs connection with the remote system can be caunmounted.
一次挂载SSHFS,可以备份多次和多个。在所有备份完成后,SSHFS连接就可以卸载
- there is no need for rdiff-backup to be installed on the remote system.
在远程系统上不需要安装rdiff-backup就可以执行备份操作
One possible disadvantage (I'm not sure yet) is that sshfs does not support extended attributes. At this moment [26 august 2007] I'm trying to find out for sure.
一个可能的缺点是sshfs不支持扩展属性(还没有最终确认)。我会尽快用实验验证。 |
|