Merge pull request #10 from BigDaddyAman/deps-update
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 commit is contained in:
commit
077929fb4d
4
main.py
4
main.py
|
|
@ -115,6 +115,10 @@ def run_backup():
|
||||||
# --------------------------
|
# --------------------------
|
||||||
# Upload to R2
|
# Upload to R2
|
||||||
# --------------------------
|
# --------------------------
|
||||||
|
if os.path.exists(compressed_file):
|
||||||
|
size = os.path.getsize(compressed_file)
|
||||||
|
log(f"[INFO] Final backup size: {size/1024/1024:.2f} MB")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = boto3.client(
|
client = boto3.client(
|
||||||
's3',
|
's3',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue