Merge pull request #64 from jkaninda/docs

chore: remove dbport from command flag
This commit is contained in:
2024-08-30 21:23:58 +02:00
committed by GitHub
4 changed files with 0 additions and 5 deletions

View File

@@ -30,7 +30,6 @@ func Execute() {
func init() {
rootCmd.PersistentFlags().StringP("dbname", "d", "", "Database name")
rootCmd.PersistentFlags().IntP("port", "p", 5432, "Database port")
rootCmd.AddCommand(VersionCmd)
rootCmd.AddCommand(BackupCmd)
rootCmd.AddCommand(RestoreCmd)

View File

@@ -63,7 +63,6 @@ Backup, restore and migrate targets, schedule and retention are configured using
| SOURCE_DB_USERNAME | Optional, required for database migration | Source database username |
| SOURCE_DB_PASSWORD | Optional, required for database migration | Source database password |
---
## Run in Scheduled mode

View File

@@ -19,8 +19,6 @@ import (
func StartBackup(cmd *cobra.Command) {
//Set env
utils.SetEnv("STORAGE_PATH", storagePath)
//utils.GetEnv(cmd, "dbname", "DB_NAME")
//utils.GetEnv(cmd, "port", "DB_PORT")
utils.GetEnv(cmd, "period", "BACKUP_CRON_EXPRESSION")
//Get flag value and set env

View File

@@ -27,7 +27,6 @@ type dbSourceConfig struct {
func getDbConfig(cmd *cobra.Command) *dbConfig {
//Set env
utils.GetEnv(cmd, "dbname", "DB_NAME")
utils.GetEnv(cmd, "port", "DB_PORT")
dConf := dbConfig{}
dConf.dbHost = os.Getenv("DB_HOST")
dConf.dbPort = os.Getenv("DB_PORT")