We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6ad74a commit 5be7c46Copy full SHA for 5be7c46
sidecar/init.go
@@ -91,6 +91,12 @@ func runCloneAndInit(cfg *Config) error {
91
}
92
93
if len(serviceURL) != 0 {
94
+ // Check has initialized. If so just return.
95
+ hasInitialized, _ := checkIfPathExists(path.Join(dataPath, "mysql"))
96
+ if hasInitialized {
97
+ log.Info("MySQL data directory existing!")
98
+ return nil
99
+ }
100
// backup at first
101
Args := fmt.Sprintf("rm -rf /backup/initbackup;mkdir -p /backup/initbackup;curl --user $BACKUP_USER:$BACKUP_PASSWORD %s/download|xbstream -x -C /backup/initbackup; exit ${PIPESTATUS[0]}",
102
serviceURL)
0 commit comments