Compare commits

...

2 Commits

Author SHA1 Message Date
36bca254a9 ci: Set -d flag for database name
Some checks failed
Build / docker (push) Failing after 8s
Lint / Run on Ubuntu (push) Successful in 18m37s
Tests / test (push) Failing after 1m0s
2025-03-14 14:34:25 +01:00
ad18d42145 fix: database name not set error when using flag -d 2025-03-14 14:32:38 +01:00
2 changed files with 2 additions and 2 deletions

View File

@@ -182,8 +182,7 @@ jobs:
-e DB_USERNAME=user \
-e DB_PASSWORD=password \
-e GPG_PASSPHRASE=password \
-e DB_NAME=testdb \
${{ env.IMAGE_NAME }}:latest backup --disable-compression --custom-name encrypted-bkup
${{ env.IMAGE_NAME }}:latest backup -d testdb --disable-compression --custom-name encrypted-bkup
echo "Database encrypted backup completed"
- name: Test restore encrypted backup | testdb -> testdb2
run: |

View File

@@ -251,6 +251,7 @@ func initBackupConfig(cmd *cobra.Command) *BackupConfig {
utils.GetEnv(cmd, "cron-expression", "BACKUP_CRON_EXPRESSION")
utils.GetEnv(cmd, "path", "REMOTE_PATH")
utils.GetEnv(cmd, "config", "BACKUP_CONFIG_FILE")
utils.GetEnv(cmd, "dbname", "DB_NAME")
// Get flag value and set env
remotePath := utils.GetEnvVariable("REMOTE_PATH", "SSH_REMOTE_PATH")
storage = utils.GetEnv(cmd, "storage", "STORAGE")