0

I have a Ubuntu 12.10 guest that is running in VMware Workstation on a Windows 7 host.

I have created a shared folder so that Ubuntu can see a folder that lives on my Windows 7 host. I then set it up so that every time Ubuntu boots, the shared folder will be mounted under /files.

So far, everything works well. However, I created a second folder called /files2 and wish to use lsyncd to sync /files to /files2.

  • lsyncd was installed using sudo apt-get install lsyncd.
  • After installation, I created /etc/lsyncd/lsyncd.conf.lua.

This is my configuration file (etc/lsyncd/lsyncd.conf.lua)

sync {
    default.rsync,
    source    = "/www",
    target    = "/www2",
    rsyncOpts = "-ltuspogX",
    delay=0
}

The problem is that the sync never seems to happen, that is even if I restart or start/stop lsyncd.

Finally, if I ever create a file in the shared folder on the host machine (windows 7), I can see it in /files, but it never gets synced to /files2.

I need to get lsyncd to sync when I create/modify/delete folders in /files in my Ubuntu guest or Windows.

Is there anything in my configuration that I have missed to cause the sync to not work?

2 Answers 2

1

rsyncOpts was depreciated you need to use the rsync {} structure in the lua config file

This link should help: https://github.com/axkibe/lsyncd/wiki/Lsyncd%202.1.x%20%E2%80%96%20Layer%204%20Config%20%E2%80%96%20Default%20Behavior

Look at the "default.rsync" section, there's some example code and below it a list of the available rsync options.

2
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – papukaija
    Oct 3, 2013 at 16:53
  • @papukaija the answer is there, the link is just a reference.
    – Braiam
    Oct 3, 2013 at 18:07
0

Try this configuration

settings {
    logfile = "/var/log/lsyncd.log",
    statusFile = "/var/log/lsyncd-status.log",
    statusInterval = 20,
    nodaemon = true
}
sync {
   default.rsync,
   source="/files1/",
   target="/files2/",
   rsync = {
     archive = true,
     compress = true,
     whole_file = false,
     _extra = { "-ltuspogX" },
     verbose = true
   },
   delay=5,
   log=all,
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .