Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync without interactive prompt #12

Open
sultanovich opened this issue Jun 16, 2014 · 12 comments
Open

Sync without interactive prompt #12

sultanovich opened this issue Jun 16, 2014 · 12 comments

Comments

@sultanovich
Copy link

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

@dooblem
Copy link
Owner

dooblem commented Jun 17, 2014

Hi, thanks for your feedback.
You're right, this could be a useful feature.
I'll think about it !!

@Busyvar
Copy link

Busyvar commented Jun 27, 2015

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

@sultanovich
Copy link
Author

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

@dooblem
Copy link
Owner

dooblem commented Jun 28, 2015

Hi guys,
I intergrated scstarkey PR, and made the appropriate changes.
Can you test it ?
Thanks,
Marc

@Busyvar
Copy link

Busyvar commented Jun 28, 2015

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

@dooblem
Copy link
Owner

dooblem commented Jul 8, 2015

Sorry, I didn't see your PR before this message.
In my mind we should fix the -b (batch) mode.

@jgabriels
Copy link

I would also like this. Ideally, it would autoaccept the left branch and create a .conflict file with the right content. This should be relatively simple by making use of rsync's --backup and --suffix= arguments.

@dooblem
Copy link
Owner

dooblem commented Feb 18, 2016

See also #23 . We may integrate this kind of solution.

.conflict files would be nice too.

@TB1234
Copy link

TB1234 commented Feb 25, 2017

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.

@dooblem
Copy link
Owner

dooblem commented Mar 1, 2017

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

@BurtGummer
Copy link

Little bit confused, is there a switch for that? There is no info about in the README.md?

@dooblem
Copy link
Owner

dooblem commented Nov 6, 2019

Yes, the README has to be updated. Just read the inline help of the command. There is a -b (batch) switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants