Summary
Improves overall backup performance and reliability for larger PostgreSQL databases
while keeping the solution fully compatible with Railway environments.
Changes
Uses PostgreSQL custom-format backups (pg_dump -Fc) for efficient storage
Enables multipart, threaded uploads to Cloudflare R2 for faster and more reliable transfers
Keeps backups restore-friendly, supporting parallel restores via pg_restore --jobs
Updates documentation to accurately reflect performance behavior
Notes on Parallelism
Parallel dumping (pg_dump --jobs) is intentionally not used, as it requires directory format
and is not suitable for Railway containers
Parallelism is supported at restore time using pg_restore --jobs with .dump files
Testing
Tested on Railway using the deps-update branch
Verified backup creation, encryption, upload, and retention cleanup
This update adds detailed logging for the final compressed backup file size before it is uploaded to R2.
### Why this is useful
- Provides visibility into the size of each backup
- Helps monitor database growth over time
- Confirms that compression or encryption worked correctly
- Useful for debugging storage or retention issues
### Notes
- Tested successfully on Railway
- Backup flow works as expected: pg_dump → compress/encrypt → size log → upload → cleanup
- No breaking changes introduced
This pull request updates two dependencies to their latest stable versions:
- boto3: 1.40.37 → 1.41.3
- python-dotenv: 1.1.1 → 1.2.1
These updates include upstream bug fixes, minor improvements, and compatibility updates for AWS SDK functionality and environment variable handling.
All updated packages have been tested in the current project environment:
- Application starts without errors
- AWS-related features work as expected
- Environment variable loading behaves normally
No breaking changes observed. Safe to merge.
### Summary
- Updated boto3 from **1.40.34 → 1.40.36**
### Why
- Keep AWS SDK up to date
- Ensures compatibility and includes the latest fixes
### Notes
- Tested on Railway with `deps-update` branch before merging
- No issues found
### Summary
- Updated boto3 from **1.40.34 → 1.40.36**
### Why
- Keep AWS SDK up to date
- Ensures compatibility and includes the latest fixes
### Notes
- Tested on Railway with `deps-update` branch before merging
- No issues found
Dependencies updated and verified on Railway:
- boto3 bumped to 1.40.34
- Backup scheduler runs successfully
- Upload, encryption, and cleanup tested
- No issues in logs
Safe to merge into `main`.