Fix 'error on line 239' when restoring backup (#194)

This commit is contained in:
Arjan H
2025-09-22 20:37:47 +02:00
parent bed2da3c2b
commit ca3a5b88c3
2 changed files with 2 additions and 3 deletions

View File

@@ -2332,7 +2332,7 @@ func _setupAdminUser(w http.ResponseWriter, r *http.Request) bool {
msg := message[0 : len(message)-4]
log.Printf("Message from server: '%s'", msg)
lines := strings.Split(strings.TrimSpace(string(msg)), "\n")
reg.Errors["File"] = "Could not import backup file: " + lines[0]
reg.Errors["File"] = "Could not import backup file: " + lines[0] + "\nSee /opt/logs/commander.log in control container."
render(w, r, "register:manage", map[string]interface{}{"User": reg, "IsLogin": true, "Progress": _progress("register"), "HelpText": _helptext("register")})
return false
}
@@ -2340,7 +2340,7 @@ func _setupAdminUser(w http.ResponseWriter, r *http.Request) bool {
log.Printf("ERROR: Message from server: '%s'", message)
lines := strings.Split(strings.TrimSpace(string(message)), "\n")
reg.Errors["File"] = "Could not import backup file: " + lines[0]
reg.Errors["File"] = "Could not import backup file: " + lines[0] + "\nSee /opt/logs/commander.log in control container."
render(w, r, "register:manage", map[string]interface{}{"User": reg, "IsLogin": true, "Progress": _progress("register"), "HelpText": _helptext("register")})
return false
}

View File

@@ -15,7 +15,6 @@ tar xzf $FILE 2>&1
cd /opt/boulder
[ -f $TMPDIR/boulder_sa_integration.sql ] || (echo "MySQL backup file not found"; exit 1)
sed -i -e "s/\(INSERT INTO \`gorp_migrations\`.*\)/-- \1/" $TMPDIR/boulder_sa_integration.sql
docker compose exec bmysql mysql boulder_sa_integration <$TMPDIR/boulder_sa_integration.sql
if [ -d $TMPDIR/nginx_ssl ]; then