sqlBackup


NamesqlBackup JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/klevze/sqlBackup
SummaryA modern Python-based backup tool for MySQL databases
upload_time2025-07-27 13:48:27
maintainerNone
docs_urlNone
authorGregor
requires_python>=3.6
licenseNone
keywords mysql backup database dump archive notification sftp ftp telegram email slack sms
VCS
bugtrack_url
requirements requests paramiko twilio
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sqlBackup

**sqlBackup** is a modern Python-based backup tool for MySQL databases. It supports advanced features such as multiple archiving formats, multi-channel notifications (Telegram, Email, Slack, SMS via Twilio, Viber, etc.), and remote uploads via protocols like SFTP, FTP, or SCP. This project is a significant upgrade from the original BackupSQL shell script.

## Features

- **MySQL Database Backup:**  
  Dumps databases using `mysqldump` with support for routines and events.
  
- **Flexible Archiving:**  
  Archive your backups in various formats:
  - `none` (plain SQL dump)
  - `gz` (gzip-compressed)
  - `xz` (xz-compressed)
  - `tar.xz` (tar archive compressed with xz)
  - `zip` (ZIP archive)
  - `rar` (RAR archive)

- **Multi-Channel Notifications:**  
  Send notifications via:
  - Telegram
  - Email
  - Slack
  - SMS (via Twilio)
  - Viber
  - Messenger (stub, to be implemented)
  
- **Remote Uploads:**  
  Optionally upload backups to a remote server using SFTP, FTP, or SCP with configurable scheduling (daily, first day, last day, specific weekday, or a numeric day of the month).

- **Wildcard Support for Ignored Databases:**  
  Use wildcard patterns (e.g., `projekti_*`) in `ignored_databases` to skip databases by name pattern.

- **Modular & Maintainable:**  
  Code is organized into multiple modules (configuration, backup logic, notifications, remote upload) for easier maintenance and extensibility.

- **Graceful Interruption:**  
  Handles CTRL+C gracefully, providing a user-friendly exit message.

- **Comprehensive Logging:**  
  Professional logging system with:
  - Colored console output with different levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)
  - File logging with automatic rotation (10MB max, 5 backup files)
  - Detailed logging for debugging and audit trails
  - Configurable log levels and output destinations

- **Configuration Validation:**  
  Robust validation system that:
  - Validates all configuration parameters with detailed error messages
  - Checks file paths, email formats, phone numbers, and URL formats
  - Ensures required sections and fields are present
  - Validates data types and allowed values
  - Provides helpful warnings for potential issues
  - Includes a standalone validation tool for testing configurations

## Table of Contents

- [Features](#features)
- [Installation](#installation)
  - [Prerequisites](#prerequisites)
  - [Setup](#setup)
- [Configuration Tutorial](#configuration-tutorial)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)

## Documentation

### For Users
- **[Installation Guide](#installation)** - Quick setup instructions
- **[Configuration Guide](#configuration-parameters)** - Complete configuration reference
- **[Tutorials](docs/TUTORIALS.md)** - Step-by-step tutorials for common tasks
- **[Configuration Validation](#configuration-validation)** - Validate your setup

### For Developers
- **[API Documentation](docs/API.md)** - Complete API reference and code documentation
- **[Developer Guide](docs/DEVELOPER_GUIDE.md)** - Development setup, architecture, and contribution guidelines
- **[Code Examples](docs/EXAMPLES.md)** - Practical examples and extension patterns
- **[Testing Guide](docs/DEVELOPER_GUIDE.md#testing-guidelines)** - Testing strategies and examples

## Installation

### Prerequisites

1. **Python 3.6+** is required.
2. **MySQL or MariaDB** client tools installed (e.g., `mysql`, `mysqldump`).

### Step-by-Step Installation (Debian 11 Example)

1. **Install Python 3 and pip**

   ```bash
   sudo apt update
   sudo apt install python3 python3-pip
   ```

2. **Clone or copy the sqlBackup project**

   ```bash
   git clone https://github.com/klevze/sqlBackup.git
   cd sqlBackup
   ```

3. **Install dependencies**

   ```bash
   pip3 install -r requirements.txt
   ```

4. **Copy and edit the configuration file**

   ```bash
   cp config.ini.default config.ini
   nano config.ini
   ```

   Edit `config.ini` to match your environment (database credentials, backup paths, notification settings, remote upload, etc.).

   **Important:** Update any placeholder paths (e.g., `[remote].key_file`) to real files on your server.

5. **(Optional) Install as a package**

   - For development:

     ```bash
     pip3 install -e .
     ```

   - For production:

     ```bash
     pip3 install .
     ```

6. **Run sqlBackup**

   - From the project directory:

     ```bash
     python3 -m sql_backup
     ```

   - Or, if installed as a package:

     ```bash
     sql-backup
     ```

**Tip:** If you see an error about a missing private key or other file, check your `config.ini` paths.

---

**Alternative installation options:**

- **Quick install script (Linux/macOS):**

  ```bash
  chmod +x install.sh
  ./install.sh
  ```

- **Windows:**

  ```batch
  install.bat
  ```

**Required dependencies:**

- `requests`: For HTTP requests (used in notifications and remote uploads).
- `paramiko`: For SFTP uploads.
- `twilio`: For sending SMS notifications.

---

**Project Structure:**

The project is organized as a modern Python package:

```text
sqlBackup/
├── setup.py              # Package installation and metadata
├── requirements.txt      # Runtime dependencies
├── requirements-dev.txt  # Development dependencies
├── config.ini.default    # Default configuration template
├── example.py            # Usage examples
├── validate_config.py    # Standalone validation tool
├── sql_backup/           # Main package
│   ├── __init__.py       # Package initialization
│   ├── __main__.py       # Module execution support
│   ├── main.py           # Application entry point
│   ├── backup.py         # Database backup functionality
│   ├── config.py         # Configuration management
│   ├── config_validator.py # Configuration validation
│   ├── logger.py         # Logging system
│   ├── notifications.py  # Multi-channel notifications
│   └── remote_upload.py  # Remote upload capabilities
├── tests/                # Comprehensive test suite
│   └── test_*.py         # Individual test modules
└── docs/                 # Complete documentation
    ├── API.md            # API reference
    ├── DEVELOPER_GUIDE.md # Development guide
    ├── EXAMPLES.md       # Code examples
    └── TUTORIALS.md      # User tutorials
```

## Logging

The application uses a comprehensive logging system that provides:

- **Console Logging:** Colored output with different levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- **File Logging:** Automatic log rotation with 10MB max file size and 5 backup files
- **Configurable Levels:** Control logging verbosity via configuration

Log files are stored in the `logs/` directory by default and include detailed information for debugging and audit trails.

## Configuration Validation

The tool includes a standalone configuration validator that checks your configuration before running backups:

   ```bash
   # Validate the default config file
   python validate_config.py

   # Validate a specific config file
   python validate_config.py --config path/to/your/config.ini

   # Verbose output showing all checks
   python validate_config.py --verbose
   ```

The validator will check:
- Required sections and parameters are present
- Data types are correct (integers, booleans, emails, URLs)
- File and directory paths exist and are accessible
- Email formats are valid
- Phone number formats are correct for SMS notifications
- URL formats are valid for webhooks
- Cross-dependencies between configuration options

## Configuration Parameters

The `config.ini` file is the central configuration file for **sqlBackup**. It is divided into several sections:

### [backup]
- **backup_dir:** Directory where backup files will be stored.
- **backup_retention_days:** Number of days to retain backups.
- **archive_format:** Archive format to use. Options: `none`, `gz`, `xz`, `tar.xz`, `zip`, `rar`.

### [mysql]
- **user, password, host:** MySQL credentials.
- **mysql_path:** Path to the MySQL client.
- **mysqldump_path:** Path to the mysqldump utility.
- **ignored_databases:** Comma-separated list of databases to skip.
  - **Now supports wildcards:** e.g. `sys, mysql, projekti_*`. Any database name matching `projekti_*` will be ignored (e.g., `projekti_alpha`, `projekti_1`).

### [telegram]
- **enabled:** Enable or disable Telegram notifications.
- **telegram_token:** Your Telegram Bot API token.
- **telegram_chatid:** Chat ID for notifications.
- **telegram_serverid:** A friendly name for your server (used in messages).

### [email]
- **enabled:** Enable or disable email notifications.
- **smtp_server, smtp_port:** SMTP server details.
- **username, password:** SMTP credentials.
- **from_address:** Sender email address.
- **to_addresses:** Comma-separated recipient email addresses.

### [slack]
- **enabled:** Enable or disable Slack notifications.
- **webhook_url:** Slack webhook URL for notifications.

### [sms]
- **enabled:** Enable or disable SMS notifications.
- **provider:** Currently supports "twilio".
- **account_sid, auth_token:** Twilio credentials.
- **from_number:** Twilio phone number.
- **to_numbers:** Comma-separated list of recipient phone numbers.

### [viber]
- **enabled:** Enable or disable Viber notifications.
- **auth_token:** Your Viber bot authentication token.
- **receiver_id:** Viber receiver ID (the user ID to send messages to).
- **sender_name:** (Optional) Sender name; defaults to "BackupBot" if not provided.

### [messenger]
- **enabled:** Enable or disable Messenger notifications.
- **page_access_token, recipient_id:** Messenger API credentials (currently not implemented).

### [notification]
- **channels:** Comma-separated list of notification channels to use (e.g., `telegram, email, slack, sms, viber`).

### [export]
- **include_routines:** Include stored procedures and functions.
- **include_events:** Include scheduled events.
- **column_statistics:** If set to false, the script adds `--column-statistics=0` to the dump command (helpful for older servers).

### [logging]
- **level:** Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL).
- **enable_console:** Enable or disable colored console output.
- **enable_file_logging:** Enable or disable file logging with automatic rotation.
- **log_directory:** Directory where log files will be stored (created automatically).

### [remote]
- **upload_enabled:** Enable or disable remote upload of backups.
- **protocol:** Upload protocol (`sftp`, `ftp`, or `scp`).
- **host, port:** Remote server details.
- **username, password:** Remote server credentials.
- **remote_directory:** Remote directory where backups will be stored.
- **upload_schedule:** When to perform the upload (e.g., `daily`, `first_day`, `last_day`, weekday, or a specific day).
- **key_file, key_passphrase:** (Optional) For SFTP public key authentication.

## Usage

To run **sqlBackup**, you have several options depending on how you installed it:

### Console Script (After pip install):
```bash
# Primary command
sql-backup

# Alternative name (backward compatibility)
sqlbackup
```

### Module Execution:
```bash
# Run as Python module
python -m sql_backup
```

### Development/Direct Execution:
```bash
# From source directory (development)
python -m sql_backup

# Standalone validation tool
python validate_config.py config.ini
```

### Programmatic Usage:
```python
# Import and use programmatically
from sql_backup import main
from sql_backup.backup import MySQLBackup
from sql_backup.config import load_config

# Run complete backup process
main()

# Or use individual components
config = load_config()
backup = MySQLBackup(config)
```

The script will:
- Connect to MySQL and dump databases (skipping those in `ignored_databases`, including wildcards).
- Archive each dump according to the specified format.
- Display a summary table with database name, backup status, elapsed time, dump size, and archive size.
- Send notifications via the enabled channels.
- Upload backups to a remote server if enabled and if the schedule condition is met.

## Contributing

Contributions are welcome! Feel free to fork the repository, open issues, and submit pull requests. Please follow the existing code style and include tests for new features.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/klevze/sqlBackup",
    "name": "sqlBackup",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "mysql backup database dump archive notification sftp ftp telegram email slack sms",
    "author": "Gregor",
    "author_email": "gregor@klevze.com",
    "download_url": "https://files.pythonhosted.org/packages/87/d6/059642dd265f2c479a68b5cbc2111f9202b2f152b37e5f6385a57428b14e/sqlbackup-0.2.2.tar.gz",
    "platform": null,
    "description": "# sqlBackup\n\n**sqlBackup** is a modern Python-based backup tool for MySQL databases. It supports advanced features such as multiple archiving formats, multi-channel notifications (Telegram, Email, Slack, SMS via Twilio, Viber, etc.), and remote uploads via protocols like SFTP, FTP, or SCP. This project is a significant upgrade from the original BackupSQL shell script.\n\n## Features\n\n- **MySQL Database Backup:**  \n  Dumps databases using `mysqldump` with support for routines and events.\n  \n- **Flexible Archiving:**  \n  Archive your backups in various formats:\n  - `none` (plain SQL dump)\n  - `gz` (gzip-compressed)\n  - `xz` (xz-compressed)\n  - `tar.xz` (tar archive compressed with xz)\n  - `zip` (ZIP archive)\n  - `rar` (RAR archive)\n\n- **Multi-Channel Notifications:**  \n  Send notifications via:\n  - Telegram\n  - Email\n  - Slack\n  - SMS (via Twilio)\n  - Viber\n  - Messenger (stub, to be implemented)\n  \n- **Remote Uploads:**  \n  Optionally upload backups to a remote server using SFTP, FTP, or SCP with configurable scheduling (daily, first day, last day, specific weekday, or a numeric day of the month).\n\n- **Wildcard Support for Ignored Databases:**  \n  Use wildcard patterns (e.g., `projekti_*`) in `ignored_databases` to skip databases by name pattern.\n\n- **Modular & Maintainable:**  \n  Code is organized into multiple modules (configuration, backup logic, notifications, remote upload) for easier maintenance and extensibility.\n\n- **Graceful Interruption:**  \n  Handles CTRL+C gracefully, providing a user-friendly exit message.\n\n- **Comprehensive Logging:**  \n  Professional logging system with:\n  - Colored console output with different levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n  - File logging with automatic rotation (10MB max, 5 backup files)\n  - Detailed logging for debugging and audit trails\n  - Configurable log levels and output destinations\n\n- **Configuration Validation:**  \n  Robust validation system that:\n  - Validates all configuration parameters with detailed error messages\n  - Checks file paths, email formats, phone numbers, and URL formats\n  - Ensures required sections and fields are present\n  - Validates data types and allowed values\n  - Provides helpful warnings for potential issues\n  - Includes a standalone validation tool for testing configurations\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n  - [Prerequisites](#prerequisites)\n  - [Setup](#setup)\n- [Configuration Tutorial](#configuration-tutorial)\n- [Usage](#usage)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Documentation\n\n### For Users\n- **[Installation Guide](#installation)** - Quick setup instructions\n- **[Configuration Guide](#configuration-parameters)** - Complete configuration reference\n- **[Tutorials](docs/TUTORIALS.md)** - Step-by-step tutorials for common tasks\n- **[Configuration Validation](#configuration-validation)** - Validate your setup\n\n### For Developers\n- **[API Documentation](docs/API.md)** - Complete API reference and code documentation\n- **[Developer Guide](docs/DEVELOPER_GUIDE.md)** - Development setup, architecture, and contribution guidelines\n- **[Code Examples](docs/EXAMPLES.md)** - Practical examples and extension patterns\n- **[Testing Guide](docs/DEVELOPER_GUIDE.md#testing-guidelines)** - Testing strategies and examples\n\n## Installation\n\n### Prerequisites\n\n1. **Python 3.6+** is required.\n2. **MySQL or MariaDB** client tools installed (e.g., `mysql`, `mysqldump`).\n\n### Step-by-Step Installation (Debian 11 Example)\n\n1. **Install Python 3 and pip**\n\n   ```bash\n   sudo apt update\n   sudo apt install python3 python3-pip\n   ```\n\n2. **Clone or copy the sqlBackup project**\n\n   ```bash\n   git clone https://github.com/klevze/sqlBackup.git\n   cd sqlBackup\n   ```\n\n3. **Install dependencies**\n\n   ```bash\n   pip3 install -r requirements.txt\n   ```\n\n4. **Copy and edit the configuration file**\n\n   ```bash\n   cp config.ini.default config.ini\n   nano config.ini\n   ```\n\n   Edit `config.ini` to match your environment (database credentials, backup paths, notification settings, remote upload, etc.).\n\n   **Important:** Update any placeholder paths (e.g., `[remote].key_file`) to real files on your server.\n\n5. **(Optional) Install as a package**\n\n   - For development:\n\n     ```bash\n     pip3 install -e .\n     ```\n\n   - For production:\n\n     ```bash\n     pip3 install .\n     ```\n\n6. **Run sqlBackup**\n\n   - From the project directory:\n\n     ```bash\n     python3 -m sql_backup\n     ```\n\n   - Or, if installed as a package:\n\n     ```bash\n     sql-backup\n     ```\n\n**Tip:** If you see an error about a missing private key or other file, check your `config.ini` paths.\n\n---\n\n**Alternative installation options:**\n\n- **Quick install script (Linux/macOS):**\n\n  ```bash\n  chmod +x install.sh\n  ./install.sh\n  ```\n\n- **Windows:**\n\n  ```batch\n  install.bat\n  ```\n\n**Required dependencies:**\n\n- `requests`: For HTTP requests (used in notifications and remote uploads).\n- `paramiko`: For SFTP uploads.\n- `twilio`: For sending SMS notifications.\n\n---\n\n**Project Structure:**\n\nThe project is organized as a modern Python package:\n\n```text\nsqlBackup/\n\u251c\u2500\u2500 setup.py              # Package installation and metadata\n\u251c\u2500\u2500 requirements.txt      # Runtime dependencies\n\u251c\u2500\u2500 requirements-dev.txt  # Development dependencies\n\u251c\u2500\u2500 config.ini.default    # Default configuration template\n\u251c\u2500\u2500 example.py            # Usage examples\n\u251c\u2500\u2500 validate_config.py    # Standalone validation tool\n\u251c\u2500\u2500 sql_backup/           # Main package\n\u2502   \u251c\u2500\u2500 __init__.py       # Package initialization\n\u2502   \u251c\u2500\u2500 __main__.py       # Module execution support\n\u2502   \u251c\u2500\u2500 main.py           # Application entry point\n\u2502   \u251c\u2500\u2500 backup.py         # Database backup functionality\n\u2502   \u251c\u2500\u2500 config.py         # Configuration management\n\u2502   \u251c\u2500\u2500 config_validator.py # Configuration validation\n\u2502   \u251c\u2500\u2500 logger.py         # Logging system\n\u2502   \u251c\u2500\u2500 notifications.py  # Multi-channel notifications\n\u2502   \u2514\u2500\u2500 remote_upload.py  # Remote upload capabilities\n\u251c\u2500\u2500 tests/                # Comprehensive test suite\n\u2502   \u2514\u2500\u2500 test_*.py         # Individual test modules\n\u2514\u2500\u2500 docs/                 # Complete documentation\n    \u251c\u2500\u2500 API.md            # API reference\n    \u251c\u2500\u2500 DEVELOPER_GUIDE.md # Development guide\n    \u251c\u2500\u2500 EXAMPLES.md       # Code examples\n    \u2514\u2500\u2500 TUTORIALS.md      # User tutorials\n```\n\n## Logging\n\nThe application uses a comprehensive logging system that provides:\n\n- **Console Logging:** Colored output with different levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n- **File Logging:** Automatic log rotation with 10MB max file size and 5 backup files\n- **Configurable Levels:** Control logging verbosity via configuration\n\nLog files are stored in the `logs/` directory by default and include detailed information for debugging and audit trails.\n\n## Configuration Validation\n\nThe tool includes a standalone configuration validator that checks your configuration before running backups:\n\n   ```bash\n   # Validate the default config file\n   python validate_config.py\n\n   # Validate a specific config file\n   python validate_config.py --config path/to/your/config.ini\n\n   # Verbose output showing all checks\n   python validate_config.py --verbose\n   ```\n\nThe validator will check:\n- Required sections and parameters are present\n- Data types are correct (integers, booleans, emails, URLs)\n- File and directory paths exist and are accessible\n- Email formats are valid\n- Phone number formats are correct for SMS notifications\n- URL formats are valid for webhooks\n- Cross-dependencies between configuration options\n\n## Configuration Parameters\n\nThe `config.ini` file is the central configuration file for **sqlBackup**. It is divided into several sections:\n\n### [backup]\n- **backup_dir:** Directory where backup files will be stored.\n- **backup_retention_days:** Number of days to retain backups.\n- **archive_format:** Archive format to use. Options: `none`, `gz`, `xz`, `tar.xz`, `zip`, `rar`.\n\n### [mysql]\n- **user, password, host:** MySQL credentials.\n- **mysql_path:** Path to the MySQL client.\n- **mysqldump_path:** Path to the mysqldump utility.\n- **ignored_databases:** Comma-separated list of databases to skip.\n  - **Now supports wildcards:** e.g. `sys, mysql, projekti_*`. Any database name matching `projekti_*` will be ignored (e.g., `projekti_alpha`, `projekti_1`).\n\n### [telegram]\n- **enabled:** Enable or disable Telegram notifications.\n- **telegram_token:** Your Telegram Bot API token.\n- **telegram_chatid:** Chat ID for notifications.\n- **telegram_serverid:** A friendly name for your server (used in messages).\n\n### [email]\n- **enabled:** Enable or disable email notifications.\n- **smtp_server, smtp_port:** SMTP server details.\n- **username, password:** SMTP credentials.\n- **from_address:** Sender email address.\n- **to_addresses:** Comma-separated recipient email addresses.\n\n### [slack]\n- **enabled:** Enable or disable Slack notifications.\n- **webhook_url:** Slack webhook URL for notifications.\n\n### [sms]\n- **enabled:** Enable or disable SMS notifications.\n- **provider:** Currently supports \"twilio\".\n- **account_sid, auth_token:** Twilio credentials.\n- **from_number:** Twilio phone number.\n- **to_numbers:** Comma-separated list of recipient phone numbers.\n\n### [viber]\n- **enabled:** Enable or disable Viber notifications.\n- **auth_token:** Your Viber bot authentication token.\n- **receiver_id:** Viber receiver ID (the user ID to send messages to).\n- **sender_name:** (Optional) Sender name; defaults to \"BackupBot\" if not provided.\n\n### [messenger]\n- **enabled:** Enable or disable Messenger notifications.\n- **page_access_token, recipient_id:** Messenger API credentials (currently not implemented).\n\n### [notification]\n- **channels:** Comma-separated list of notification channels to use (e.g., `telegram, email, slack, sms, viber`).\n\n### [export]\n- **include_routines:** Include stored procedures and functions.\n- **include_events:** Include scheduled events.\n- **column_statistics:** If set to false, the script adds `--column-statistics=0` to the dump command (helpful for older servers).\n\n### [logging]\n- **level:** Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL).\n- **enable_console:** Enable or disable colored console output.\n- **enable_file_logging:** Enable or disable file logging with automatic rotation.\n- **log_directory:** Directory where log files will be stored (created automatically).\n\n### [remote]\n- **upload_enabled:** Enable or disable remote upload of backups.\n- **protocol:** Upload protocol (`sftp`, `ftp`, or `scp`).\n- **host, port:** Remote server details.\n- **username, password:** Remote server credentials.\n- **remote_directory:** Remote directory where backups will be stored.\n- **upload_schedule:** When to perform the upload (e.g., `daily`, `first_day`, `last_day`, weekday, or a specific day).\n- **key_file, key_passphrase:** (Optional) For SFTP public key authentication.\n\n## Usage\n\nTo run **sqlBackup**, you have several options depending on how you installed it:\n\n### Console Script (After pip install):\n```bash\n# Primary command\nsql-backup\n\n# Alternative name (backward compatibility)\nsqlbackup\n```\n\n### Module Execution:\n```bash\n# Run as Python module\npython -m sql_backup\n```\n\n### Development/Direct Execution:\n```bash\n# From source directory (development)\npython -m sql_backup\n\n# Standalone validation tool\npython validate_config.py config.ini\n```\n\n### Programmatic Usage:\n```python\n# Import and use programmatically\nfrom sql_backup import main\nfrom sql_backup.backup import MySQLBackup\nfrom sql_backup.config import load_config\n\n# Run complete backup process\nmain()\n\n# Or use individual components\nconfig = load_config()\nbackup = MySQLBackup(config)\n```\n\nThe script will:\n- Connect to MySQL and dump databases (skipping those in `ignored_databases`, including wildcards).\n- Archive each dump according to the specified format.\n- Display a summary table with database name, backup status, elapsed time, dump size, and archive size.\n- Send notifications via the enabled channels.\n- Upload backups to a remote server if enabled and if the schedule condition is met.\n\n## Contributing\n\nContributions are welcome! Feel free to fork the repository, open issues, and submit pull requests. Please follow the existing code style and include tests for new features.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A modern Python-based backup tool for MySQL databases",
    "version": "0.2.2",
    "project_urls": {
        "Bug Reports": "https://github.com/klevze/sqlBackup/issues",
        "Documentation": "https://github.com/klevze/sqlBackup#readme",
        "Homepage": "https://github.com/klevze/sqlBackup",
        "Source": "https://github.com/klevze/sqlBackup"
    },
    "split_keywords": [
        "mysql",
        "backup",
        "database",
        "dump",
        "archive",
        "notification",
        "sftp",
        "ftp",
        "telegram",
        "email",
        "slack",
        "sms"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d97a5ff2ac056b9064b2415b3c05a644699f7b308dba44ed67360917ad2c02d1",
                "md5": "80a9f42dd91c6c8169cc21edd24b666a",
                "sha256": "ffea9ad060ca8b8a41b7fe4bd27b4081f636b2506a7ad1c019c46651d2a368b9"
            },
            "downloads": -1,
            "filename": "sqlbackup-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80a9f42dd91c6c8169cc21edd24b666a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 48926,
            "upload_time": "2025-07-27T13:48:25",
            "upload_time_iso_8601": "2025-07-27T13:48:25.822165Z",
            "url": "https://files.pythonhosted.org/packages/d9/7a/5ff2ac056b9064b2415b3c05a644699f7b308dba44ed67360917ad2c02d1/sqlbackup-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "87d6059642dd265f2c479a68b5cbc2111f9202b2f152b37e5f6385a57428b14e",
                "md5": "5408638639517c2efc317979fbb110eb",
                "sha256": "e676be1e7d2867d40a0d34b53d0f91a347b73c013109998780d6ac3c4bba3198"
            },
            "downloads": -1,
            "filename": "sqlbackup-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5408638639517c2efc317979fbb110eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 47849,
            "upload_time": "2025-07-27T13:48:27",
            "upload_time_iso_8601": "2025-07-27T13:48:27.120265Z",
            "url": "https://files.pythonhosted.org/packages/87/d6/059642dd265f2c479a68b5cbc2111f9202b2f152b37e5f6385a57428b14e/sqlbackup-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-27 13:48:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "klevze",
    "github_project": "sqlBackup",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.25.0"
                ]
            ]
        },
        {
            "name": "paramiko",
            "specs": [
                [
                    ">=",
                    "2.7.0"
                ]
            ]
        },
        {
            "name": "twilio",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        }
    ],
    "lcname": "sqlbackup"
}
        
Elapsed time: 1.87063s