Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nclack/mirror
Mirrors one directory to another while checking for consistency.
https://github.com/nclack/mirror
Last synced: about 2 months ago
JSON representation
Mirrors one directory to another while checking for consistency.
- Host: GitHub
- URL: https://github.com/nclack/mirror
- Owner: nclack
- Created: 2014-03-26T14:23:29.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-02T14:32:32.000Z (almost 11 years ago)
- Last Synced: 2023-03-11T18:16:54.800Z (almost 2 years ago)
- Language: JavaScript
- Size: 168 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mirror
## Description
A utility to monitor a directory and copy any added files/directories to
another directory; to mirror one directory to another.The added twist is that every so often, copied files will be
queried to make sure they are consistent with the files added to the source
directory. If consistency is found the original file will be deleted.This should be useful for copying files as they are generated from one
filesystem to another over a somewhat unreliable connection.## Usage
Requires [node.js][1].
```
node mirror.js
```
[1]: http://nodejs.org/## Notes
* There are various setable time constants that determine how often things are polled.
These are set at the top of the mirror.js script.
* There are two ways of checking for consistency: md5 hash of the contents, and file size.
Currently, file size is used since this minimizes bandwidth overhead.
The md5 checker is still inside mirror.js, so if you want to switch back it's possible.