lsyncd (without deleting target if source deleted), How?
by limotux from LinuxQuestions.org on (#5NWER)
Hi guys,
I installed and configured lsyncd on Manjaro - KDE and configured it on my laptop to sync 2 folders, a source and a target. Working fine somehow.
What I want to do is:
1. if file xyz.txt is synced from source to target, then deleted from source, I want it not be deleted from target, and vice versa. Preferably if deleted from source or target it should remain on the other.
2. if recopied xyz.txt from target back to source, any updates or editing should be synced to target AND satisfying above point.
3. I need the lsyncd to start upon system boot, whether a user logged in or not.
I generally prefer lsyncd because it is almost instant, doesnt need cron like rsync, it maybe easier on laptop resources I think.
here is my "/etc/lsyncd/lsyncd.conf.lua" file:
Quote:
I read on several websites there is an option to put in the config file
Quote:
Which I tried but whenever I put lsyncd doesnt work.
Any help, suggestions, will be highly appreciated.
Thank you.
I installed and configured lsyncd on Manjaro - KDE and configured it on my laptop to sync 2 folders, a source and a target. Working fine somehow.
What I want to do is:
1. if file xyz.txt is synced from source to target, then deleted from source, I want it not be deleted from target, and vice versa. Preferably if deleted from source or target it should remain on the other.
2. if recopied xyz.txt from target back to source, any updates or editing should be synced to target AND satisfying above point.
3. I need the lsyncd to start upon system boot, whether a user logged in or not.
I generally prefer lsyncd because it is almost instant, doesnt need cron like rsync, it maybe easier on laptop resources I think.
here is my "/etc/lsyncd/lsyncd.conf.lua" file:
Quote:
ettings { logfile = "/var/log/lsyncd/lsyncd.log", statusFile = "/var/log/lsyncd/lsyncd.status" } sync { default.rsync, source = "/home/limo/LimoData/TransferedFiles/rsyncsource/", target = "/home/limo/LimoData/TransferedFiles/rsynctarget", exclude = {'.git/' , 'vendor/', 'web/node_modules', 'bundled/'}, rsync = { archive = true, compress = true } } |
Quote:
delete = false |
Any help, suggestions, will be highly appreciated.
Thank you.