Develop a utility for performing backups and restorations of MySQL and PostgreSQL databases. The utility should feature a CLI interface for backup and restoration commands and support versioning.
-
SQL Usage:
- The utility will utilize SQL commands for operations.
-
Backup Features:
- Backup database structure.
- Backup data.
- Backup both database structure and data.
- Backup specific tables.
- Store all backups in a single file.
- Store backups in separate files:
<table_name>.DDL
for structure<table_name>.DML
for data<table_name>.DCL
for permissions
-
Restoration Features:
- Restore database structure.
- Restore data.
- Restore specific tables.
-
Additional Features:
- Versioning of backups.
- *Incremental backup creation.
- **Decremental backup creation.
- Indication of backup process progress.
- Implementation: The utility should be implemented in Python.
- Unit Tests: Implement unit tests for the utility.
Note: Features marked with an asterisk () are optional enhancements.*