This is the home page of PIrsyncD.
PIrsyncD stands for: Python Inotify Rsync Daemon.
Created by Evaggelos Balaskas <ebalaskas AT ebalaskas DOT gr>
Description:
This is an attempt of writing a daemon to watch a directory for kernel’s inotify events and then execute an rsync command to synchronize two different directories (local or remote). This is a poor man’s mirroring or an alternative (not so) real data replication mechanism and it is based on Pyinotify.
Download:
Always the latest version is here: PIrsyncD
Latest version is 20100724
Current md5sum & sha1sum:
md5: 1ed8ff06536df3b7909d6f7a1906f332
sha1: 0f82937685f292962fb03f888a6a022aa83a5fef
or via mercurial, PIrsyncD on bitbucket
hg clone https://ebal@bitbucket.org/ebal/pirsyncd/
Features:
Some of the features of the PIrsyncD:
- There is no need of installation!
- Run as a Daemon
- Can run as a Daemon in foreground
- Simple Configuration, you only have to configure your source and destination directories
- Configuration Check at the begging
- Ability to check and stop the daemon
- Syntax help with –help
- For every parameter there is a usage examples with –examples
- Support multiple running instances
- Mirroring to a remote (destination) server (needs password-less connection) through ssh connection
- Mirroring to a remote (destination) server (needs rsync password-file) through rsync connection
- Error handling via exceptions
- A customized delay for mirroring directories (dont rsync asap when an event is trigged)
- Gets arguments from command line - there is no need of hack the code.
- Synchronization at start (mirroring via rsync) - first run
- Definition of rsync version from command line
- Logging functionality of rsync process
- Partial rsync functionality
- Append rsync functionality
- Functionality to exclude files larger than MAX-SIZE or smaller than MIN-SIZE
- Debugging pyinotify events
- Debugging rsync command
- Autolearning new subdirectories
- Resolving duplicates inode events for multiple files/events
- You can rsync every n (NUMBER) inode events (simple delay method)
- Supports python3 with PIrsyncD.v3
- Clean code and python code styling using pylint
- 7.35 with pylint (previous 7.21) !
- Lines of code (has a lot of comments !) and it is written on KISS principle
egrep -vc '#|^$' PIrsyncD 393
PIrsyncD monitors for these inotify events:
- IN_ATTRIB
- IN_CLOSE_WRITE
- IN_CREATE
- IN_DELETE
- IN_MODIFY
- IN_MOVED_TO
- IN_MOVED_FROM
- IN_DELETE_SELF
PS: this is my very first python script, i would appreciate any comments
FAQ:
For people who can read greek, there is a FAQ about PIrsyncD: FAQ – PIrsyncD
Mini Presentation:
Here is a mini presentation or inotify,pyinotify and PIrsyncD
