dooblem / bsync

Bidirectional Synchronization using Rsync
GNU General Public License v3.0
289 stars 61 forks source link

ACL and batch mode: improvement proposal #23

Open vstefanoxx opened 8 years ago

vstefanoxx commented 8 years ago

bsync.txt

Hi

I propose following changes, and attach a diff file bsync.txt with a suggested implementation: 1) -b (batch mode) should in my opinion skip the "Apply actions" prompt (or alternatively would be better provide a silent option) 2) I added --acls, --xattrs and --compress to rsync arguments, just because I needed them: would be nice to add them by default or allow them optionally 3) in conflict prompt I added option "r" and "ra" to allow automatic resolution of conflicts based on following rules:

4) I added a -a (autoanswer) option, with which is possible to decide the answer to all conflicts prompts (1, 2 or r)

I know, it can be very dangerous to allow automatic resolution of conflicts, but that's what I need and I think is very helpful to give possibility to a completely background run.

A feature to backup conflicted files and directory would be wonderful. In rsync there is --backup option, but I think is not useful in the cases when rsync is called inside bsync.

I never coded in python, so be indulgent with provided code.

PS bsync is one of few programs I could find that allow remote and bidirectional synchronization based on rsync with move and rename detection of files and directory.

Thank you for sharing it

dooblem commented 8 years ago

Hello Stefano,

Thanks for using bsync.

My comments Point 1: right, you found a bug.

Point 2 : Good idea, but I would suggest adding a single option to add any rsync argument (a bit like -o option for ssh). However, for acl and xattrs, pay attention that bsync will not detect changes in acls or xattr (due bsync snapshot file format).

Point 3: I'm not absolutely sure of what is the best algorithm for automatic resolution. But anyway I think there is no perfect solution for that. Sounds good.

Point 4: A -a option will be weird with -b option (and -a is to close to rsync famous option). I would suggest modifying the -b option to accept an argument : with "-b" or "-b e" we get the actual behaviour : exit on conflict.

If you have time, feel free to modify/code. I do not have plenty of time for bsync those days.

Anyway, thanks for your contribution.

Marc

vstefanoxx commented 8 years ago

Hello Marc

If you have time, feel free to modify/code

I never used github to code, I don't know what you mean about it. Can I modify the main branch or you suggest me to fork?

2016-02-18 21:44 GMT+01:00 Marc MAURICE notifications@github.com:

Hello Stefano,

Thanks for using bsync.

My comments Point 1: right, you found a bug.

Point 2 : Good idea, but I would suggest adding a single option to add any rsync argument (a bit like -o option for ssh). However, for acl and xattrs, pay attention that bsync will not detect changes in acls or xattr (due bsync snapshot file format).

Point 3: I'm not absolutely sure of what is the best algorithm for automatic resolution. But anyway I think there is no perfect solution for that. Sounds good.

Point 4: A -a option will be weird with -b option (and -a is to close to rsync famous option). I would suggest modifying the -b option to accept an argument : with "-b" or "-b e" we get the actual behaviour : exit on conflict.

If you have time, feel free to modify/code. I do not have plenty of time for bsync those days.

Anyway, thanks for your contribution.

Marc

— Reply to this email directly or view it on GitHub https://github.com/dooblem/bsync/issues/23#issuecomment-185911515.

dooblem commented 8 years ago

You have to fork, make all the changes, then open a pull request.