Skip to content

Commit e423c82

Browse files
committed
Correctly check backup status after database is started
CheckStatus checks for volume which is however created by podman only when database container is running.
1 parent 7d31272 commit e423c82

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

mgradm/cmd/backup/db/enable.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ func Enable(force bool) error {
5858
return err
5959
}
6060

61-
// Check if all is well configured
62-
if err := CheckStatus(); err != nil {
63-
return err
64-
}
65-
6661
// Prepare initial snapshot. For this container either must be running or we need to start container database
6762
log.Info().Msg(L("Starting database…"))
6863
if err := systemd.StartService(podman.DBService); err != nil {
@@ -72,6 +67,11 @@ func Enable(force bool) error {
7267
return err
7368
}
7469

70+
// Check if all is well configured
71+
if err := CheckStatus(); err != nil {
72+
return err
73+
}
74+
7575
if err := RunBaseBackup(cnx); err != nil {
7676
return err
7777
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Check backup status only after database is started (bsc#1262492)

0 commit comments

Comments
 (0)