Refactoring of code, renaming env variables name

This commit is contained in:
2024-07-30 08:59:15 +02:00
parent 05a195e1ba
commit 886773e38f
6 changed files with 35 additions and 19 deletions

View File

@@ -21,8 +21,7 @@ func StartRestore(cmd *cobra.Command) {
storage = utils.GetEnv(cmd, "storage", "STORAGE")
file = utils.GetEnv(cmd, "file", "FILE_NAME")
executionMode, _ = cmd.Flags().GetString("mode")
bucket := os.Getenv("BUCKET_NAME")
bucket := utils.GetEnvVariable("AWS_S3_BUCKET_NAME", "BUCKET_NAME")
switch storage {
case "s3":
utils.Info("Restore database from s3")