标签归档:rsync

rsyncd setup on Mac OsX

To set up an rsync server on a Mac can be quite tricky.

That’s my way to do that!

It is possible to simply launch rsync daemon by typing:

rsync –daemon

This will start a rsync daemon running on TCP port 873, but without the appropriate rsyncd.conf all the configuration has to be done by command line arguments.
In addition, if the server needs to be rebooted, the process will not restart automatically on boot.

On Mac OsX inetd is no longer an option since processes use launchd and launchdctl to load XML process files. 继续阅读

rsync server daemon on Mac OS X with launchctl

There are many web pages describing how to enable the rsync daemon on Mac OS X using launchd/launchctl mechanism. But I had to use a different (and simpler) plist file in LaunchDaemons to make it work across reboots on Lion (10.7.4).

(I started by following this guide , and this very similar one. And I also read this and this. In the end, what helped me getting the plist file right was this thread. Particularly this post: “For one you have both a Program and a ProgramArguments key, when you should have only one or the other (you use Program if there is just one element to the command, or ProgramArguments if there are multiple.” And this one.)
继续阅读

inotify+rsync实现触发式文件同步

一般我们把rsync放在crontab里进行定时文件同步,同步的延时有可能会比我们想象的长。这里你可以使用inotify来对文件进行监控,实现触发式同步。

在安装inotify-tools前请先确认你的linux内核是否打到了2.6.13,并且在编译时开启了CONFIG_INOTIFY选项。你可以按下面的方式简单的确认这一点:ls /proc/sys/fs/inotify,如果支持的话会有 max_queued_events,max_user_instances,max_user_watches三项。 继续阅读

如何保持Linux服务器间的文件同步

本文详细介绍rsync服务的安装配置以及如何利用rsync保持Linux服务器间的文件同步。

  服务器之间常常要保持些文件或目录的一致,比如一些大的软件下载网站,它们通常使用多台服务器来提供下载服务。当一台服务器上的文件更新后,其它的服务器也需要更新,而且 在更新的时候应该是只对新增或是修改过的文件进行更新,否则会造成网络带宽和时间的浪费。rsync就是能有效的保持文件及目录的一致的优秀软件。 继续阅读

构建安全rsync

一、前言
随着安全要求的提高,我们逐渐采用sftp或scp来取代ftp。然而,可能由于网络状况等原因,使 得scp/sftp可能发生中断。为此,不得不很痛苦的重新拷贝文件,不仅麻烦,还严重浪费带宽和时间。在这里,我们采用rsync over ssh的 方式,既安全又方便,因为rsync支持断点续传。 继续阅读