项目作者: mnit-rtmc

项目描述 :
A low-latency directory mirroring service
高级语言: Rust
项目地址: git://github.com/mnit-rtmc/mere.git
创建时间: 2019-10-04T20:39:56Z
项目社区:https://github.com/mnit-rtmc/mere

开源协议:Other

下载


Mere

Mere

Mere is a real-time file mirroring tool for Linux.

It has minimal runtime dependencies, using bundled versions of libssh2 and
openssl.

Authentication happens using one of two methods:

  1. Public key authentication using a private key from
    /home/{username}/.ssh/id_rsa. This only works if the file does not require
    a password.
  2. Agent authentication, which should work when running interactively.

Building

First, install Perl modules required for OpenSSL:

  • FindBin
  • File/Compare
  • IPC-Cmd

With cargo:

  1. cargo build --release

Running

  1. Usage: ./target/x86_64-unknown-linux-musl/release/mere [OPTIONS]
  2. A real-time file mirroring tool
  3. Optional arguments:
  4. -h, --help Print help message
  5. -d, --destination DESTINATION
  6. Destination: <host> or <host>:<port>
  7. -p, --path PATH Directory or file path (can be used multiple times)
  8. -w, --watch Watch paths for changes using inotify
  • --destination is required
  • One or more --path arguments are required
  • --watch uses inotify to watch each specified path, mirroring files which are
    closed after writing, deleted or moved.

Running as a systemd Service

As root:

  1. cp ./target/x86_64-unknown-linux-musl/release/mere /usr/local/bin/
  2. cp ./mere.service /etc/systemd/system/
  • Edit /etc/systemd/system/mere.service
  • Replace {destination} and {path} on ExecStart=/usr/local/bin/mere line
  1. systemctl enable mere
  2. systemctl start mere

Check status with:

  1. systemctl status mere