Closed Wicloz closed 7 years ago
Thanks for the pull request! I'm going to need some time to review these changes -- I like that you kept each change separate, that will make it easier.
I think rdiff-backup
depends on librsync1
but not the entire rsync
application.
I believe rsync
comes default in most distributions anyway.
I tested all the changes and am currently running this for my servers, with the mirror folder in a tmpfs. My world is still fine after multiple reboots and crashes.
I'm going to accept this PR, but I am disappointed that my request for an update to the README and a check for rsync
at the beginning of the script was ignored. I'll go ahead and make those changes myself.
Sorry about that, I read between the lines too much and thought you intended to make the changes...
No worries! Thank you for getting this code straightened out.
The current mirror system does not stop properly and is generally unreliable.
The stop and start functions have been changed to handle the starting and stopping of mirrors much more reliably (and actually work in the first place). The use of ramdrives as the mirror location has been taken into account. The stop and force-stop function have been improve to prevent issues with the mirrors being synchronized as the world is shutting down and saving. The syncMirrorImage function now uses rsync instead of cp. Backups have been slightly changed to work with these changes.
All changes are fully backwards compatible.