deviantony / xtrabackup-scripts

Wrapper scripts (Python) for the Percona Xtrabackup tool.
http://www.percona.com/doc/percona-xtrabackup
110 stars 46 forks source link

fix service handling (should be compatible with most Linux distributi… #38

Closed hoonetorg closed 8 years ago

hoonetorg commented 8 years ago

…ons nowadays)

hoonetorg commented 8 years ago

This works also with systemd on el7 distries. service mysql start/stop will be redirected to systemctl start/stop mysql. should be the same for Debian, Ubuntu 16.04+

deviantony commented 8 years ago

Thanks for the PR but I'm not sure if I should merge it because I think it can cause issues on older distributions.

hoonetorg commented 8 years ago

I understand your concerns about backward compatibility. On the other hand all major distributions switched to systemd now and there restoring backups with pyxtrabackup must be broken, am I wrong? The "service" command can be used on sysv and systemd as I said. A colleague told me a Debian Lenny would not have a service command (I did not verify :) ).

Probably it's better to

For me it is fixed (I compiled an rpm for el7 with the fix and put it in a repo :) )

deviantony commented 8 years ago

I've started to debate about this in #32

And from that comment https://github.com/deviantony/xtrabackup-scripts/issues/32#issuecomment-159010689

I do not want to add more code to manage service handling depending on the system.

In order to work with the majority of systems, I think that it would be better to let the user manage the service by himself. I'd accept a PR to remove the service management from the tool and let the user manage the service with an updated procedure.

In the meantime, I'll merge your PR as, as you said, most new distros should support it.

deviantony commented 8 years ago

Released and pushed to pypi.

hoonetorg commented 8 years ago

:+1: