-
Notifications
You must be signed in to change notification settings - Fork 61
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
New modes: mirror and backup, while maintaining the bsync snaphots #48
base: master
Are you sure you want to change the base?
Conversation
Thanks ! let me a few days to review that. |
# remove inconsistent newsnap if error in find | ||
cmd+= " || ( rm -f "+quote(dirname+"/"+newsnapname)+" && false )" | ||
cmd+= ["||", "(", "rm", "-f", dirname+newsnapname, "&&", "false", ")"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using os.path.join(dirname, newsnapname)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a good idea to change that to path.join. Internally, even on Windows, bsync uses slashes everywhere - because it uses posix tools and because all snapshots contain slashes only. So using path.join at this place would be singular.
However, your remark suggests me that path.join should be removed on the remaining three places too, though it probably doesn't break anything, not even on Windows. I haven't tested bsync on Windows in ssh mode, so I cannot tell.
Hi, any progress? |
Updated usage in README.md
I made three commits:
bsync didn't work in Windows with the only rsync I've found (cwRsync). cwRsync doesn't recognise disk-letter colons, Bsync had similar problems with Windows. First commit fixes this.
bsync required that all conflicts were resolved immediately. In batch mode, bsync stopped on the first conflict. The second commit allows correct handling of unresolved conflicts - they are left for later bsync runs. This is also required for the third commit.
Third commit implements new uni-directional synchronization modes: backup and mirror (backup doesn't synchronize deletes). These modes correctly update bsync snaphots. Execution of bi-directional sync and uni-directional mirror and backup can be mixed without breaking the snapshots. Second commit is required.
I also added python unit tests of bsync of all tree modes.
Note: I tested that only locally in Windows, though I tried to keep it working in posix/ssh.