diff --git a/internal/pipes/mc.go b/internal/pipes/mc.go index 9919e08..d3991f1 100644 --- a/internal/pipes/mc.go +++ b/internal/pipes/mc.go @@ -38,11 +38,10 @@ func Mc(in_pipe *script.Pipe, cmd := []string{ "mc", "pipe", - fmt.Sprintf("%s/%s/backups/%s-%s-%s_%s.dump", + fmt.Sprintf("%s/%s/backups/%s-%s_%s.dump", minio_alias, upc["bucket"], prefix, - source_db, schema, table), } // Combine the slice for printing and execution. diff --git a/internal/pipes/pg_dump.go b/internal/pipes/pg_dump.go index 8fc070b..95c7a37 100644 --- a/internal/pipes/pg_dump.go +++ b/internal/pipes/pg_dump.go @@ -32,10 +32,10 @@ func PG_Dump_Table(creds *vcap.CredentialsRDS, schema string, table string, debu } // Combine the slice for printing and execution. combined := strings.Join(cmd[:], " ") + logging.Logger.Printf("BACKUPS pg_dump targeting %s\n", creds.DB_Name) if debug { fmt.Printf("command: %s\n", combined) } - logging.Logger.Printf("BACKUPS pg_dump targeting %s\n", creds.DB_Name) return script.Exec(combined) } @@ -61,9 +61,9 @@ func PG_Dump(creds *vcap.CredentialsRDS, debug bool) *script.Pipe { } // Combine the slice for printing and execution. combined := strings.Join(cmd[:], " ") + logging.Logger.Printf("BACKUPS pg_dump targeting %s\n", creds.DB_Name) if debug { fmt.Printf("command: %s\n", combined) } - logging.Logger.Printf("BACKUPS pg_dump targeting %s\n", creds.DB_Name) return script.Exec(combined) } diff --git a/internal/pipes/s3.go b/internal/pipes/s3.go index e7d93ec..c4ab6a8 100644 --- a/internal/pipes/s3.go +++ b/internal/pipes/s3.go @@ -26,18 +26,17 @@ func S3(in_pipe *script.Pipe, "s3", "cp", "-", - fmt.Sprintf("s3://%s/backups/%s-%s.dump", + fmt.Sprintf("s3://%s/backups/%s-%s_%s.dump", up.Bucket, prefix, - source_db), + schema, table), } // Combine the slice for printing and execution. combined := strings.Join(cmd[:], " ") + logging.Logger.Printf("BACKUPS s3 targeting %s\n", prefix) if debug { fmt.Printf("command: %s\n", combined) - } - logging.Logger.Printf("BACKUPS s3 targeting %s\n", prefix) return in_pipe.Exec(combined) }