Merge pull request #64 from jkaninda/docs
chore: remove dbport from command flag
This commit is contained in:
@@ -30,7 +30,6 @@ func Execute() {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.PersistentFlags().StringP("dbname", "d", "", "Database name")
|
rootCmd.PersistentFlags().StringP("dbname", "d", "", "Database name")
|
||||||
rootCmd.PersistentFlags().IntP("port", "p", 5432, "Database port")
|
|
||||||
rootCmd.AddCommand(VersionCmd)
|
rootCmd.AddCommand(VersionCmd)
|
||||||
rootCmd.AddCommand(BackupCmd)
|
rootCmd.AddCommand(BackupCmd)
|
||||||
rootCmd.AddCommand(RestoreCmd)
|
rootCmd.AddCommand(RestoreCmd)
|
||||||
|
|||||||
@@ -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_USERNAME | Optional, required for database migration | Source database username |
|
||||||
| SOURCE_DB_PASSWORD | Optional, required for database migration | Source database password |
|
| SOURCE_DB_PASSWORD | Optional, required for database migration | Source database password |
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
## Run in Scheduled mode
|
## Run in Scheduled mode
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import (
|
|||||||
func StartBackup(cmd *cobra.Command) {
|
func StartBackup(cmd *cobra.Command) {
|
||||||
//Set env
|
//Set env
|
||||||
utils.SetEnv("STORAGE_PATH", storagePath)
|
utils.SetEnv("STORAGE_PATH", storagePath)
|
||||||
//utils.GetEnv(cmd, "dbname", "DB_NAME")
|
|
||||||
//utils.GetEnv(cmd, "port", "DB_PORT")
|
|
||||||
utils.GetEnv(cmd, "period", "BACKUP_CRON_EXPRESSION")
|
utils.GetEnv(cmd, "period", "BACKUP_CRON_EXPRESSION")
|
||||||
|
|
||||||
//Get flag value and set env
|
//Get flag value and set env
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ type dbSourceConfig struct {
|
|||||||
func getDbConfig(cmd *cobra.Command) *dbConfig {
|
func getDbConfig(cmd *cobra.Command) *dbConfig {
|
||||||
//Set env
|
//Set env
|
||||||
utils.GetEnv(cmd, "dbname", "DB_NAME")
|
utils.GetEnv(cmd, "dbname", "DB_NAME")
|
||||||
utils.GetEnv(cmd, "port", "DB_PORT")
|
|
||||||
dConf := dbConfig{}
|
dConf := dbConfig{}
|
||||||
dConf.dbHost = os.Getenv("DB_HOST")
|
dConf.dbHost = os.Getenv("DB_HOST")
|
||||||
dConf.dbPort = os.Getenv("DB_PORT")
|
dConf.dbPort = os.Getenv("DB_PORT")
|
||||||
|
|||||||
Reference in New Issue
Block a user