I’m using lsyncd to sync some data on a Linux server. I’ve set up an exclude list at /etc/lsyncd/excludes.txt and specified that the /test2024/ directory should be excluded. However, I want to include certain subdirectories within /test2024/, specifically /test2024/test1/, /test2024/test2/, and /test2024/test3/.
Is there a way to include these specific subdirectories while still excluding the parent directory ‘/test2024/’?
settings {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.status",
nodaemon = false,
statusInterval = 10,
maxProcesses = 80,
delay = 5
}
sync{
default.rsync,
source="/mnt/datadrive/",
target="user@<ip_address>",
excludeFrom="/etc/lsyncd/excludes.txt",
rsync = {
binary = "/usr/bin/rsync",
links = true,
archive = true,
acls = true,
owner = true,
group = true,
perms = true,
},
delete = true
}
sync{
default.rsync,
source="/mnt/datadrive/",
target="user@<ip_address>",
excludeFrom="/etc/lsyncd/excludes.txt",
rsync = {
binary = "/usr/bin/rsync",
links = true,
archive = true,
acls = true,
owner = true,
group = true,
perms = true,
},
delete = true
}