drunomics / syncd Goto Github PK
View Code? Open in Web Editor NEWWatches for file changes and rsyncs them to a remote machine.
Home Page: http://wolfgangziegler.net/auto-rsync-local-changes-to-remote-server
License: MIT License
Watches for file changes and rsyncs them to a remote machine.
Home Page: http://wolfgangziegler.net/auto-rsync-local-changes-to-remote-server
License: MIT License
I would like to make use of this script to sync the single source directory to multiple hosts that share the same destination directory.
If I present a list of host names in the config file, ideally it would iterate over them and issue the rsync command to each one.
SSH_HOST = fileserver-1.dm.com, fileserver-2.dm.com
something like this possible?
FYI
Made several improvements and will maintain
https://github.com/dkebler/syncd
This looks exactly like what I need. I'm going to be using something like this in development, since I need to sync with a development server. The lack of activity on this PR is a little concerning though. Is this project still actively maintained?
Not every rsync setting should includes --delete option to rsync.
It's like I don't want much clutter to be downloaded from a remote site.
If I'm not very carefull of adding every folder to the --exclude options then I'll be in big big trouble.
I'm having an issue with syncd, where having set it up as per the ReadMe, on making any changes I am not given any time to enter my ssh password and get an error.
Steps to replicate:
The password prompt appears mulitple times, but automatically goes straight to permission denied a number of times, without me having had the chance to enter my ssh password. As expected this causes rsync to fail.
Syncd then appears to hang, and there is no further updates to the output. However, while further changes do get added to the log, nothing gets synced.
Output from command:
Starting syncd...
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender] sent 130,268 bytes received 52,551,969 bytes 2,065,970.08 bytes/sec
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1] total size is 52,090,545 speedup is 0.99
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1]
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
Permission denied, please try again.
Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender] no changes added to commit (use "git add" and/or "git commit -a")
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1]
Just want to use syncd locally but script is only set up for ssh.
I just changed this line
COMMAND="rsync $RSYNC_OPTIONS --exclude=$RSYNC_EXCLUDE --delete $WATCH_DIR/ $SSH_USER@$SSH_HOST:$REMOTE_TARGET_DIR"
to
COMMAND="rsync $RSYNC_OPTIONS --exclude=$RSYNC_EXCLUDE --delete $WATCH_DIR/ $REMOTE_TARGET_DIR"
Would be sweet if the SSH setting were not supplied (commented out) then the script would assume local.
Would be even sweeter if I made a PR. Bash is not my bag but I'll give it a shot when I have some "spare time".
Thx...great little repo!
add to syncd
--rsh \"ssh -p $PORT\"
in
COMMAND="rsync $RSYNC_OPTIONS --exclude=$RSYNC_EXCLUDE --delete $WATCH_DIR/ --rsh \"ssh -p $PORT\" $SSH_USER@$SSH_HOST:$REMOTE_TARGET_DIR"
To syncd.conf add
PORT=22
And in syncd change line to
run)
eval $COMMAND && echo Done.
;;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.