release: v1.0.6 optional local backup retention
Add optional KEEP_LOCAL_BACKUP environment variable to control local backup retention. Default behavior remains unchanged: backup files are deleted locally after successful upload, keeping deployments safe on Railway and other PaaS platforms with ephemeral storage. When KEEP_LOCAL_BACKUP=true is set, backups are preserved locally, which is useful for CLI usage, local machines, VPS, or NAS workflows. Documentation and CLI output were updated for clarity. No breaking changes.
This commit is contained in:
parent
3f9ac9f4e5
commit
7730bf4b25
|
|
@ -54,6 +54,11 @@ def doctor():
|
||||||
else:
|
else:
|
||||||
print("Compression : gzip")
|
print("Compression : gzip")
|
||||||
|
|
||||||
|
if os.environ.get("KEEP_LOCAL_BACKUP", "false").lower() == "true":
|
||||||
|
print("Local backups : kept after upload")
|
||||||
|
else:
|
||||||
|
print("Local backups : deleted after upload")
|
||||||
|
|
||||||
print("\nDoctor check complete.")
|
print("\nDoctor check complete.")
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -65,6 +70,7 @@ def config_show():
|
||||||
"DUMP_FORMAT": os.environ.get("DUMP_FORMAT", "dump"),
|
"DUMP_FORMAT": os.environ.get("DUMP_FORMAT", "dump"),
|
||||||
"FILENAME_PREFIX": os.environ.get("FILENAME_PREFIX", "backup"),
|
"FILENAME_PREFIX": os.environ.get("FILENAME_PREFIX", "backup"),
|
||||||
"MAX_BACKUPS": os.environ.get("MAX_BACKUPS", "7"),
|
"MAX_BACKUPS": os.environ.get("MAX_BACKUPS", "7"),
|
||||||
|
"KEEP_LOCAL_BACKUP": os.environ.get("KEEP_LOCAL_BACKUP", "false"),
|
||||||
"BACKUP_TIME": os.environ.get("BACKUP_TIME", "00:00"),
|
"BACKUP_TIME": os.environ.get("BACKUP_TIME", "00:00"),
|
||||||
"R2_BUCKET_NAME": os.environ.get("R2_BUCKET_NAME", ""),
|
"R2_BUCKET_NAME": os.environ.get("R2_BUCKET_NAME", ""),
|
||||||
"R2_ENDPOINT": os.environ.get("R2_ENDPOINT", ""),
|
"R2_ENDPOINT": os.environ.get("R2_ENDPOINT", ""),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue