This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# This script backups selected databases in local MySQL server | |
# | |
# REQUIREMENTS | |
# - mysqldump bzip2 | |
# - MySQL or MariaDB configured with one of theirs options : | |
# - auth_socket plugin for root access (modern default's auth method for root account) | |
# - /etc/mysql/debian.cnf with a valid privileged account | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal | |
class InterruptableRegion(object): | |
def __init__(self, sig=signal.SIGINT): | |
self.sig = sig | |
self.interrupted = False | |
self.released = False | |
self.original_handler = None | |
def __enter__(self): |