Skip to content

Commit

Permalink
Displaying unsupported config (#7650)
Browse files Browse the repository at this point in the history
* Displaying unsupported config

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* spell checks and corrections

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* Done! backup doesn't support for managed services and file_system

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* Fixed PR comments

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* corrected message

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>
  • Loading branch information
daveaugustus committed Jan 9, 2023
1 parent c104319 commit d2ab942
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion components/automate-cli/cmd/chef-automate/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var allPassedFlags string = ""
const (
AUTOMATE_CMD_STOP = "sudo chef-automate stop"
AUTOMATE_CMD_START = "sudo chef-automate start"
BACKUP_CONFIG = "file_system"
)

type BackupFromBashtion interface {
Expand Down Expand Up @@ -797,7 +798,7 @@ func runDeleteBackupCmd(cmd *cobra.Command, args []string) error {
start := 0
var validIds []string
var backup []*api.BackupTask

if strings.Contains(args[0], "/") || strings.Contains(args[0], "\\") {
location = args[0]
start = 1
Expand Down Expand Up @@ -1225,6 +1226,18 @@ func (ins *BackupFromBashtionImp) executeOnRemoteAndPoolStatus(commandString str
}()
}
sshUtil.getSSHConfig().hostIP = automateIps[0]

// If managed service and filesystem backup, info: "we don't have support for this configurations"
config, err := getExistingHAConfig()
if err != nil {
return status.Wrap(err, status.ConfigError, "unable to fetch HA config")
}

if config.Architecture.ConfigInitials.BackupConfig == BACKUP_CONFIG && isManagedServicesOn() {
writer.Printf("As of now, we do not support file_system backup with AWS managed DB.\n")
return nil
}

if pooling {
cmdRes, err := sshUtil.connectAndExecuteCommandOnRemote(commandString, true)
if err != nil {
Expand Down

0 comments on commit d2ab942

Please sign in to comment.