FIX: Update database_restorer to avoid shell use (PR #12731)

Follow-up to 0ec5fd5262647633399e856b0fba93735f6d6c11

GitHub