1

我正在尝试将我的 mac 上的文件夹与我构建的 ubuntu 服务器 16.06 系统上的文件夹同步。问题出在 rsync 版本上。这就是我所做的。我在 /var/log/lsyncd/ 中创建了一个文件并将其命名为 lsyncd.conf.lua。以下是其内容:

settings {
 logfile = "/var/log/lysncd/lsyncd.log", -- Sets the log file
 statusFile = "/var/log/lsyncd/lsyncd-status.log" -- Sets the status log file
 }
sync {
 default.rsyncssh, -- uses the rsyncssh defaults Take a look here: https://github.com/axkibe/lsyncd/blob/master/default-rsyncssh.lua
 delete = false, -- Doesn't delete files on the remote host eventho they're deleted at the source. This might be beneficial for some not for others
 source="/Users/alixchristakaze/Desktop", -- Your source directory to watch
 host="", -- The remote host (use hostname or IP)
 targetdir="", -- the target dir on remote host, keep in mind this is absolute path
 rsync = {
 binary = "/usr/local/bin/rsync",
 archive = true, -- use the archive flag in rsync
 perms = true, -- Keep the permissions
 owner = true, -- Keep the owner
 _extra = {"-a"}, -- Sometimes permissions and owners isn't copied correctly so the _extra can be used for any flag in rsync
 },
 maxProcesses = 1 -- We only want to use a maximum of 1 rsync processes at same time
 }

运行此命令时出现此错误:lsyncd /var/log/lsyncd/lsyncd.conf.lua

Warn: Using /dev/fsevents which is considered an OSX internal interface.

Warn: Functionality might break across OSX versions (This is for 10.5.X)
Warn: A hanging Lsyncd might cause Spotlight/Timemachine doing extra work.
Error: Cannot access /dev/fsevents monitor! (1:Operation not permitted)

如您所见,我添加了这一行binary = "/usr/local/bin/rsync",,希望它会告诉系统使用我通过自制软件安装的 rsync。但是,我收到了上面的错误。我有最新的 mac 版本 10.12.3 ,我的 rsync 版本是 3.1.2 。我究竟做错了什么?

4

0 回答 0