Code Monkey home page Code Monkey logo

resync's Introduction

ReSync

ReSync (REpository SYNChronizer) is a small utility used to continuously and unilaterally synchronize a master machine (typically a coding machine) with slaves machines (build or execution machines) in real time.

The name come from the original usage (synchronize a git repository from a coding machine to a build/execution machine) and is a word play with rsync.

Installation

Install the requirements for Debian-based system:

sudo apt-get install rsync inotify-tools

Install the requirements for Arch Linux system:

sudo pacman -S rsync inotify-tools

Configure the system by increasing the inotify’s watches for a user, otherwise, the Couldn't initialize inotify: Too many open files error could happened:

sudo make configure

Install it in normal mode:

sudo make install

Install it in development mode:

sudo make install-dev

Uninstall it:

sudo make uninstall

Usage

Call the script with:

  1. The repository path as first argument,
  2. The machines’ SSH names as second (and more) argument(s).
resync $pwd $hostname

The repository will be continuously synchronized to the SSH machine, in a git folder under its home directory ($REMOTE:$HOME/git), using inotify as change detection system and rsync as transfer system.

Contributing

Regarding the current installation method, resync.sh has to remain a single-file project for now.

Tasks

Improve reliability

Use a system-wide lock file (e.g. touch /tmp/resync-$(pwd) or using a symlink) during all resync process to not allow launching 2 resync processes in the same git project.

Improve features

Use a repository-wide lock file (e.g. touch .git/.resync-lock) during rsync process to allows launching resync on two machines for the same repo, allowing to do duplex synchronization.

Alternatives

OSync [GitHub, AUR]
Bidirectional file sync script based on RSync.

resync's People

Contributors

pierreay avatar

Watchers

 avatar

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.