mirror of
https://kolaente.dev/konrad/docker-db-backup.git
synced 2026-01-10 02:50:08 +01:00
feat: add backup compression
This commit is contained in:
@@ -18,6 +18,7 @@ type conf struct {
|
||||
Schedule string
|
||||
MaxBackups int
|
||||
CompletionWebhookURL string
|
||||
CompressBackups bool
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -30,6 +31,7 @@ const (
|
||||
envSchedule = `BACKUP_SCHEDULE`
|
||||
envMax = `BACKUP_MAX`
|
||||
envCompletionWebhookURL = `BACKUP_COMPLETION_WEBHOOK_URL`
|
||||
envCompressBackups = `BACKUP_COMPRESS`
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -66,6 +68,11 @@ func init() {
|
||||
if has {
|
||||
config.CompletionWebhookURL = webhookURL
|
||||
}
|
||||
|
||||
compress, has := os.LookupEnv(envCompressBackups)
|
||||
if has {
|
||||
config.CompressBackups = compress == "1" || compress == "true"
|
||||
}
|
||||
}
|
||||
|
||||
func updateFullBackupPath() {
|
||||
|
||||
Reference in New Issue
Block a user