Giter Club home page Giter Club logo

dmirror's Introduction

# What is DMirror
- DMirror is a real-time directory sync tool, used for local and remote file sync. Compare to DRBD, DMirror has these features:
  - 1, DMirror is built on application level, on the top of file system
  - 2, DMirror's slave can be read, even write
  - 3, DMirror can switch master with slave very easy
  - 4, DMirror has a monitor HTTP display page

# How to use
  - 0.1, set /proc/sys/fs/inotify/max_user_watches and /proc/sys/fs/inotify/max_queued_events to proper number
  - 0.2, set local and remote rsync dir
  - 1, start master, ./dmirror mainbase dmirror1.ini
  - 2, start slave, ./dmirror mainbase dmirror2.ini
  - 3, curl "http://your_master_ip:your_master_port/setmaster" to start master-slave sync
  - 4, when you want to switch master-slave, curl "http://your_slave_ip:your_slave_port/setmaster" to start a new slave-master sync

# How DMirror works
  - depend on rsync(recommend 3.0.9),inotify(kernal 2.6.13+), and file system
  - DMirror has 3 process roles:
    1, mainbase: accepet HTTP command, communicate with other processes by UNIX socket, monitor other processes, and control all state-transition
    2, watcher: use inotify to watch what file created,deleted,modified and write to RLog
    3, sender: read from RLog and send rsync command to remote

# Supported HTTP command
  - setmaster
  - setslave
  - getstate
  - getstatus(HTML)
  - showconf
  - updateconf

# Author
  kobe, feedback [email protected]
  thanks renzhong to test

dmirror's People

Stargazers

 avatar

Watchers

Yecheng Fu avatar James Cloos avatar  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.