Giter Site home page Giter Site logo

mere's Introduction

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:

cargo build --release

Running

Usage: ./target/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
  • 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:

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

Check status with:

systemctl status mere

mere's People

Contributors

douglau-mnit avatar douglau avatar

Stargazers

Jeff Carpenter avatar  avatar  avatar  avatar  avatar

Watchers

Lucian avatar James Cloos avatar  avatar  avatar  avatar  avatar

Forkers

ajunlonglive

mere's Issues

Use sftp

Switch to sftp and check for remote files on startup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.