Giter Site home page Giter Site logo

philcryer / lipsync Goto Github PK

View Code? Open in Web Editor NEW
854.0 19.0 57.0 352 KB

lipsync sets up a lightweight service that provides command-line, Dropbox like syncing

Home Page: http://lipsync.info

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%

lipsync's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lipsync's Issues

overwrites crontab for user

I used to have jobs in my crontab for the user given for the install, after running the install script, they are all gone and replaced by the one for lipsync. I'm not sure if I missed a question in the install process or if this is default behavior. I ran the install script on Debian 6.

Cannot sync large size of file

I copy a *.iso into client which size in around 700M, i find lipsync(/usr/local/bin/lipsyncd) try to copy from client to server. It takes time to copying. In the meanwhile, the client cron job for lipsync(/usr/local/bin/lipsync) is running, and detect server side does not contain this large file, then remove this large file in client.

Manually solution,
*disable client cron job for lipsync, and wait for a while to make sure it is really stopped.
*create this large file
*wait for a while to let lipsync(/usr/local/bin/lipsyncd) try to copy from client to server
*make sure both size have same file
*re-enable client cron job for lipsync

I hope, we can have this automatic in future.

rsync just runs every minute

There's no locking (or use of e.g. Tim Kay's solo). So if 1 rsync takes an hour, you'll get an overlap every minute, eventually crashing the server.

That's it, this project isn't ready for production at all, sorry.

Cron is broken...again

cron is not working as advertised, and that's the part that actually pulls changes from the server, so without it, lipsync only appears to be doing syncs in one direction. I need to read up on how to have a setup script create a cron script, I copied an existing one in /etc/cron.d, but it fails...however, if I run this command (as root) all is good, updates on the server come down to the client:

su phil -c "/usr/local/bin/lipsync"

of course the above won't work for you unless your (user)name is also phil :)

Feature request: File versioning

One great feature that Dropbox offers a versioning backup system.
Have you looked into implementing this with say, an automated git repository on the server? You could even use git cloneing to nicely have an offsite backup, just like Dropbox has.

Some features that you would get for free:

  • Cloneing
  • File merging
  • File conflict management (by using a repository for each machine)
  • File transfer protocol

lipsyncd not added to startup.

New files are not detected by lipsync on the client, and consequently deleted every cron sync, until lipsynd is manually started.

I had to add lipsynd to startup with update-rc.d on all clients

update-rc.d lipsyncd defaults

client syncing

Hello,

just set up the server with two clients. I am experiencing the following issues on both clients:

Occasionally a new file added to the sync directory on a client will be deleted.
Updates to existing files on a client will not sync across to the server
Deleting files will occasionally have them recreated from the server.

Any suggestions how to track it down. The logs simply state exactly what is occurring.

Proxy handling

When a computer is in a network that needs a proxy, the cron job fails.

How can we add proxy handling to the application ?

Messages during install

During install (running install.sh) we don't have the error message when :

  • lua is not installed
  • lsynd is not installed
  • path to lsync / lua is not valid

An error message should be great to debug.

can i have a ignore list in cient?

i hope i can have a ignore list in client to ignore to sync some files to server. I do not need to sync some files from server to my client_A; But these files need to sync from server to my client_B.

Make lipsync able to handle multiple users

goozbach asked:

  1. What are the design ideas/goals for making lipsync able to handle
    multiple users?

I replied:
I haven't had any, and yes, having it in ~/$HOME/.lipsync/ is where I
want it to be, then when /etc/init.d/lipsyncd is called, it does a
loop through all /home/*/ dirs, and if it finds the ~/$HOME/.lipsync/
it'll know to kick it off for that user. This is how the commandline
dropbox app works btw, but they use a var in the init.d script to
identify the users - something I'd like to get away from:

#DROPBOX_USERS="user1 user2"
DROPBOX_USERS="phil"

DAEMON=.dropbox/dropbox

start() {
   echo "Starting dropbox..."
   for dbuser in $DROPBOX_USERS; do
       HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
       if [ -x $HOMEDIR/$DAEMON ]; then
           HOME="$HOMEDIR" start-stop-daemon -b -o -c $dbuser -S -u
$dbuser -x $HOMEDIR/$DAEMON
       fi
   done

chown $username:$username

Hello,

I'm running lipsync on archlinux and I had some errors in the installation process. One is with all the chown $username:$username.
I don't know if there is a group with the same name as the username in ubuntu and debian but not in archlinux. Is there a reason to do it that way ?

I fixed it using group=$(id -g $username) and chown $username:$group everywhere.

files deleted on client after server restart

I have a test setup with 2 clients (PC and LAPTOP) and a server (hosted on the PC).

When both clients are on it works brilliantly! However if I turn off PC (so that there is no server), alter the files on LAPTOP (create/delete/etc) and then turn back on the PC the altered files on LAPTOP get reinstated to that of the server.

Perhaps I have set it up incorrectly? Is there a way around this or the server can have no down time?

Cheers for the great program :-)

Error while changing the local sync directroy

When we change the local path in /etc/lipsyncd, the files are erased on the server. We loose files.

It might be cool if the existing local files are pushed to the server and the remote one are pulled. We can handle it that way.

Error on lipsyncd startup

When we start the daemon /etc/init.d/lipsyncd start and the /usr/loca/bin/lipsyncd does'nt exist, the script just exit whitout an error message. We don't really know if the daemon failed or not.

Can you add an error message ?

cat: /home/phil/.lipsyncd/lipsyncd.log: No such file or directory

I recently installed lipsync on my plug computer but I dont think it it's working properly. Changes made to the client arent synced back to the server but changes made to the server are synced to the client. Also I do have to run lipsync manually and then I get "cat: /home/phil/.lipsyncd/lipsyncd.log: No such file or directory". Where is the config files stored?

Native OSX support

make lipsync's installer work with OSX (uname -a = darwin) as well as Linux. We need to get a version of lsyncd2 working using fevents or some other kernel watching mech

Basic desktop notification

Use notify-send (or fall back to something like zenity) for desktop notifications. Later put in logic to handle it with growl if we're in OSX. Would be best if this were configurable via each user's conf file.

Broken local dir declaration

Just setting up lipsync for the first time. I've run through the install.sh with elevated privileges and supplied all the arguments to generate to the /etc/lipsyncd conf file. Everything in there looks great.

Initial sync interprets the input for client directory as that fullpath, but on the server, rather than the client (local machine). I do not believe this is expected behavior. I've tested this several times. If I specify a fullpath that does indeed exist on the laptop ("client"), it will report that the directory does not exist, unless I create it on the server first, in which case it will work successfully. The client machine then syncs files correctly, but between the "client" and "remote" folders, both of which are on the remote machine ("server").

Am I misunderstanding something? Should there be both client and server folders on the server, and then I should set up my own rules for syncing? Should each client have its own folder on the server, in addition to the server master copy, or is this not expected behavior, as I suspected?

libsyncd unrecognized option '-delay'

When running the install script for lipsync, the script exits with the error message

Starting lipsyncd daemon.../usr/local/bin/lipsyncd: unrecognized option '-delay'
            NOTICE: lipsyncd failed to start...

Trying to just run libsyncd with the --delay option presents me with a similar message and after running --help, it appears my version of lsync (1.26) doesn't support this option.

When I run libsyncd with no options, it appears to run, but whenever I create a document on my client, it is deleted when the cron script runs. Documents created on the server still show up and my log files display nothing out of the ordinary.

Impossible to package

Please split system and per-user configuration and accept a path argument or env variable (DESTDIR preferred).

Local and remote directory names

To be able to sync two directories, they (the remote and the local) must have the same name.

Is it possible to sync directories with different names ?

Use a lipsync-specific ssh-key

goozbach asked:

  1. Why not use a lipsync-specific ssh-key and corresponding ~/.ssh/
    config section?

Why not indeed, that's a great idea. Will look into it.

During initial run, don't do rsync --delete

after install lipsyncd is kicked off, and the first step is to run a rsync --delete to make the server match the client...this is not correct behavior. If we add another client later we want it to get whatever the server has. I think the way to solve this is to have the install script run an initial rsync without the --delete flag, so we can get the server and client in sync without either side 'winning'. This is a high priority

rsync errors

when running /usr/local/bin/lipsyncd, I get the following error messages in lipsyncd.log:

Thu Aug 11 15:53:49 2011 Debug: daemonizing now.
Thu Aug 11 15:53:49 2011 Function: Inotify.addWatch(/media/Garbage/sync/, (true), (nil), (nil))
Thu Aug 11 15:53:49 2011 Inotify: addwatch(/media/Garbage/sync/)->1
Thu Aug 11 15:53:49 2011 Function: Inotify.addWatch(/media/Garbage/sync/sync/, (true), (nil), (nil))
Thu Aug 11 15:53:49 2011 Inotify: addwatch(/media/Garbage/sync/sync/)->2
Thu Aug 11 15:53:49 2011 Normal: recursive startup rsync: /media/Garbage/sync/ -> 192.168.5.1:/mnt/home/danarky/sync/
Thu Aug 11 15:53:49 2011 Exec: /usr/bin/rsync [--delete] [-r] [-lts] [/media/Garbage/sync/] [192.168.5.1:/mnt/home/danarky/sync/]
Thu Aug 11 15:53:49 2011 Call: getAlarm()
Thu Aug 11 15:53:49 2011 Debug: getAlarm returns: (false)
Thu Aug 11 15:53:49 2011 Masterloop: going into select (no timeout).
DD-WRT v24-sp2 mini (c) 2010 NewMedia-NET GmbH
Release: 08/12/10 (SVN revision: 14929)
Enhanced with OTRW

rsync: failed to set times on "/mnt/home/danarky/sync/.": Operation not permitted (1)
rsync: recv_generator: mkdir "/mnt/home/danarky/sync/sync" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
Thu Aug 11 15:53:50 2011 Call: collectProcess()
Thu Aug 11 15:53:50 2011 Delay: collected an event
Thu Aug 11 15:53:50 2011 Error: Failure on startup of '/media/Garbage/sync/'.

Any ideas what might be causing this?

On a separate note, I believe I found two typos. In install.sh, line 203, '$REMOTE_HOST':'$LOCAL_DIR' '$REMOTE_DIR' should be changed to '$REMOTE_HOST':'$REMOTE_DIR' '$LOCAL_DIR'

And in /usr/local/bin/lipsync, line 50, $REMOTE_HOST:$LOCAL_DIR $REMOTE_DIR should be changed to $REMOTE_HOST:$REMOTE_DIR $LOCAL_DIR

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.