bsync
bsync copied to clipboard
Sync without interactive prompt
Hi dooblem, I'm Sorry, this is not a issue but I don´t find other method to contact to you. I have one question, is it possible synchronised directories without interactive prompt?. I want to use the cron daemon to automate the synchronization of a directory, but this will not be possible if I have an interactive prompt.
For example:
[root@aest-segu42 apeiti]# /root/bsync -v /home/apeiti/ [email protected]:/home/apeiti
Password:
Loading filelists... Loading original filelist from snap files... Loading .bsync-snap-20140616160929.950125... Loading dir1 filelist... Loading dir2 filelist... Analysing original paths... Analysing remaining new paths in dir1... Analysing remaining new paths in dir2...
(LEFT DIR CONTENT) (RIGHT DIR CONTENT) (ACTION)
<-- A000552.dmp (copy)
passwd_acceso1 <-- passwd_acceso1 (sync)
Todo in /home/apeiti/: cp:1 sync:1 Todo in [email protected]:/home/apeiti: Apply actions? [y/N] y
Applying actions... Applying actions in dir2... Applying actions in dir1... rsync: A000552.dmp rsync: passwd_acceso1 Updating filelists... Updating snap files: .bsync-snap-20140616161840.452684... Done! Cleaning SSH master... [root@aest-segu42 apeiti]#
Thanks a lot
Hi, thanks for your feedback. You're right, this could be a useful feature. I'll think about it !!
Hi dooblem, Why the PR for non-interactive mode isn't accepted yet? If it's only a problem of parameter naming (-n or -b), could you simply accept it and make a revision after? Thanks
Hi Burian,
If you can make the necessary changes I could test the new version in my UNIX lab. If we do this, dooblem only have to review and update the version.
Thanks
Hi guys, I intergrated scstarkey PR, and made the appropriate changes. Can you test it ? Thanks, Marc
Hi, The Integration testing is working and -b parameter works! ... partially. It fail as expected when there is conflict, but it doesn't say automatically Yes to copy & sync. I don't know how it could be use in a cron job without this behavior; perhaps a parameter like -y (--yes-to-all) is more relevant to describe this? Thanks
Sorry, I didn't see your PR before this message. In my mind we should fix the -b (batch) mode.
I would also like this. Ideally, it would autoaccept the left branch and create a
See also #23 . We may integrate this kind of solution.
.conflict files would be nice too.
To fix the problem with the batch-mode change the following code:
Replace the code in line 1025 with the following code:
if noninteractive:
resp = "y"
else:
resp = "non"
This will make accept all changes automatically.
thanks @TB1234 fixed and pushed to master. Also added a test case for this bug. Can you test it ? note: the actual behaviour is still to exit on conflicts
Little bit confused, is there a switch for that? There is no info about in the README.md?
Yes, the README has to be updated. Just read the inline help of the command. There is a -b (batch) switch.