LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-28-2021, 01:13 AM   #1
limotux
LQ Newbie
 
Registered: Aug 2021
Distribution: Distro: EndeavourOS KDE Plasma - Lenovo G580 Dual Core model: Intel Core i5-3210M
Posts: 15

Rep: Reputation: 0
lsyncd (without deleting target if source deleted), How?


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:
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
}
}
I read on several websites there is an option to put in the config file

Quote:
delete = false
Which I tried but whenever I put lsyncd doesnt work.
Any help, suggestions, will be highly appreciated.

Thank you.

EDIT:
I finally just used the cp command,
Quote:
yes |cp -a -u -r SOURCE TARGET
and I made it a script that I run manually.

Last edited by limotux; 08-28-2021 at 07:57 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copied files from SOURCE to TARGET but now want to rsync SOURCE to existing TARGET teddymills1 Linux - Newbie 3 10-28-2019 07:07 AM
Lsyncd Configuration arunabh_biswas Linux - General 2 09-08-2019 01:15 PM
lsyncd error: Illegal instruction usafitz Linux - Newbie 2 11-14-2013 12:01 PM
[SOLVED] Problems setting up lsyncd AndrewD Linux - General 1 05-07-2013 10:43 PM
[SOLVED] Need Help With Lsyncd 2.0 faint545 Linux - Software 1 03-20-2011 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration