A low-latency directory mirroring service
Mere is a real-time file mirroring tool for Linux.
It has minimal runtime dependencies, using bundled versions of libssh2
andopenssl
.
Authentication happens using one of two methods:
/home/{username}/.ssh/id_rsa
. This only works if the file does not requireFirst, install Perl modules required for OpenSSL:
With cargo
:
cargo build --release
Usage: ./target/x86_64-unknown-linux-musl/release/mere [OPTIONS]
A real-time file mirroring tool
Optional arguments:
-h, --help Print help message
-d, --destination DESTINATION
Destination: <host> or <host>:<port>
-p, --path PATH Directory or file path (can be used multiple times)
-w, --watch Watch paths for changes using inotify
--destination
is required--path
arguments are required--watch
uses inotify to watch each specified path, mirroring files which areAs root:
cp ./target/x86_64-unknown-linux-musl/release/mere /usr/local/bin/
cp ./mere.service /etc/systemd/system/
/etc/systemd/system/mere.service
ExecStart=/usr/local/bin/mere
line
systemctl enable mere
systemctl start mere
Check status with:
systemctl status mere