Skip to content

Instantly share code, notes, and snippets.

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):
@Zeuh
Zeuh / bash_backup_all_mysql_databases.sh
Last active February 2, 2024 13:48 — forked from shakhmehedi/bash_backup_all_mysql_databases.sh
Bash scripts to backup all databases in a MySQL server with the option to exclude some databases.
#!/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
#