https://codeberg.org/cyber-luna/lunas
Archlinux: yay -S lunas
i made a versatile syncing cli program, lunas, that’s capable of syncing local to local, local to remote, remote to local and remote to remote at the same time with many input directories, with their file attributes if enabled and more. It syncs both ways but it has src/dest options that can be assigned to individual input directories
it runs locally, unless remote syncing is used then it runs peer-to-peer using libssh/sftp
It can do sync removal between different input directories, meaning if u want to remove a file/directory that you don’t want to sync back to other directories, you can “lunas -rm file” for local or “lunas -rrm user@ip:/path/to/dir” for remote and then use the option “-cr Y” while syncing to remove it from every other directories, or simply don’t use this option and it should be ignored without removal, or “-cr S” and it should be synced back to the directory it was removed from, IF it was found in one of the other directories
it has an optional config file for defining presets for easier syncing instead of writing them each time in the cli
there are more options to it which can be found in the --help or in the man page for more details
a simple usage of lunas can be like this
lunas -p dir1 -p dir2 --dry-run
lunas -s dir1 -d dir2 -d dir3 -rd user@ip:dir4
lunas -r user@ip:dir1 -d dir2 -dr
lunas -rs user@ip:dir1 -d dir2 -cr Y
lunas -rd user@ip:dir1 -s dir2
lunas -p dir1 -p dir2 -p dir3 -p user@ip:dir4 -p user@ip:dir5
p: local path r: remote path , both of them are source and destination
s: source local path d: destination local path
rs: source remote path rd: destination remote path
-dr/–dry-run: outputs what would be synced without actually syncing them
-cr/–confirm-remove Y: confirms the sync removal as explained previously
Is it trying to solve any problem that is not solved by rsync/rclone?
Don’t get me wrong, I love new tools, just curious how is it different (better or worse) from rsync?
i’m not familiar with rclone. I’m kinda familiar with rsync, but not much so excuse me if i got something wrong,
3 main things that are in lunas but not in rsync
lunas doesn’t have as many options as rsync, it still has many tho, u could take a quick look at both of them to compare if you want. But i’m still developing lunas and i wanna make it even more cooler, it’s been like over 6 months since i started it, so hopefully more cool stuff come in the future
None of that really matters.
What’s your sync algorithm? How are you detecting when a file changes? How do you resolve conflicts? How do you guarantee against data loss?
These are the reasons people use rsync.
quick overview of the syncing algo
in the copying, or filesystem in general, functions, C++ provide methods to check if certain operations were faulty or not, i use these methods combined with checking the return of remote reading/writing if successful or not, if a write or read to a buffer produced an error, syncing to that file stops and it goes to the next file. that file stays named as file.ls.part
lunas doesn’t have checksum option, not yet at least i might add it later. so if that is a problem for someone, they could avoid using lunas for now
but i made a seperate program that checks recursively checksums of many input directories which i usually use when needed to check if lunas is working correctly or not
btw just to be clear, as mentioned in the license, –> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more details. -> https://www.gnu.org/licenses/gpl-3.0.en.html
Some formatting messed up, use a linebreak between words and —
thx! i learned some markdown and edited my reply. Does it look good now?
You may want
```
Code
```
For codeblocks
And `code` for inline code
Btw the “\” is the escape symbol which you can use to deactivate styles
Thank you!
So this is like “normal”, “send only”, “recieve only” folders in syncthing?
I took a look at their docs https://docs.syncthing.net/v1.27.5/users/foldertypes
And it seems similar
Src/send-only -> send files to other dest/receive-only
Dest/recieve-only -> doesn’t send any file modifications or new files to other directories
Src+dest/normal -> send files to other dest and receives files from other srcs
With the option -D/-diff enabled file modifications can be synced, with newer files replacing older files