docker-db-auto-backup
docker-db-auto-backup copied to clipboard
Add support for custom backup provider patterns
Overview
This PR adds the ability to extend backup providers with custom patterns using environment variables, making the tool more flexible for users who have specific container naming conventions.
Features
- Added support for custom backup provider patterns via environment variables
- Extended the documentation with details on how to use this feature
- Added tests to ensure functionality works correctly
Implementation
Users can now add custom container patterns to the existing backup providers by setting environment variables in the format CUSTOM_BACKUP_PROVIDER_<provider_name>_PATTERNS=pattern1,pattern2,.... This allows for extending the patterns list without modifying the code.
For example:
CUSTOM_BACKUP_PROVIDER_POSTGRES_PATTERNS=immich-app/postgres,custom-postgres
Documentation
Updated the README.md with:
- A new "Custom Backup Providers" section explaining the feature
- Example usage with environment variables
- Updated docker-compose.yml example
Testing
- Added a comprehensive test for the custom backup provider patterns feature
- All existing tests continue to pass
Use Case
This addresses the use case where users need to back up databases with container patterns not included by default, such as "immich-app/postgres".