Score:0

lsyncd include specific files exclude rest

gb flag

I am using lsyncd version 2.2.2. here is my current code.

settings {
 logfile = "/etc/lsyncd.log",
 statusFile = "/etc/lsyncd.status",
 insist = true,
}

sync { 
default.rsyncssh, 
source = "/home/abc/public_html/course/testcgi/adminfiles", 
host = "xxx.xx.xxx.xxx, 
targetdir = "/home/abc/public_html/course/testcgi/adminfiles", 
delay = 0, 
exclude = { '*'  }, 

rsync = { 
perms = true, 
owner = true, 
} 
}

As the code stands above it will and does exclude all files. Now I want to include specific file names. I have tried

include = { '*'  } 
include-from = { '*'  } 

but neither is working.

Is this not possible to do?

Thanks.

Michael Hampton avatar
cz flag
I suspect your config file does not actually work with all those backslashes you have put in. You should try removing them.
gb flag
Sorry I should have mentioned this. the backslashes are not in my actual code. for some reason the only way to get a return carriage in this post i had to use the backslash. i have removed the backslashes. But that was not the issue with the code. still need help please.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.