Added on_success and on_failure callbacks.

The on_success command is called when db rotation succeeds.
The on_failure command is called if the db rotation fails.