Replace raw console.error calls in the backup import/migrations routes with createLogger + ErrorWithMetadata so restore failures flow through the standard log transports (console + Redis). Wrap the temporary DB close in finally so a close failure cannot 500 a successful restore, and log client-side restore and analysis failures to the browser console.