52
submitted 6 months ago by cyberluna@programming.dev to c/linux@lemmy.ml

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

you are viewing a single comment's thread
view the rest of the comments
[-] cyberluna@programming.dev 4 points 6 months ago

i'm not very knowledgeable with features of syncthing, but it's not exactly similar to syncthing. syncthing works well if you want a daemon working in the background checking for new added files, and then syncing them to remote

lunas doesn't have a daemon, maybe in the future that could be added idk.

idk if syncthing can sync file attributes and handle dereferencing symlink and checking for broken links, but lunas can do that

also lunas is a small 620K cli binary unlike syncthing which is a big 23M gui program

syncthing is more cross-platform than lunas. lunas works on Android tho, but inside Termux

but syncthing isn't good at local syncing as mentioned in their docs https://docs.syncthing.net/users/faq.html#does-syncthing-support-syncing-between-folders-on-the-same-system

lunas can do local syncing very well

this post was submitted on 23 Apr 2024
52 points (100.0% liked)

Linux

48159 readers
529 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS