/panel/configuracion:
Backup
Download a full copy of the database or storage buckets.
Restore accounts
Generate a new password for a user and send it to their email.
Backup — /panel/configuracion/respaldo
Allows downloading a complete dump of the Supabase database in SQL format, or a ZIP archive of all storage bucket files. The process can take several minutes depending on data volume.
Backup types
ThePOST /api/admin/generate-backup endpoint accepts a type field:
| Type | Output | Format |
|---|---|---|
database | Full SQL dump of all public tables and views | .sql file |
images | ZIP archive of all Supabase Storage bucket files | .zip file |
What the database backup contains
The generated.sql file includes:
- Schema (
CREATE TABLE): definition of all public tables with columns, data types, and primary keys. - Views (
CREATE OR REPLACE VIEW): recreation of all views in thepublicschema. - Data (
INSERT INTO): all records from each table in batches of 1,000 rows.
The backup does not include database functions, triggers, RLS policies, or data from schemas other than
public. Only BASE TABLE type tables are covered.Generating a database backup
Go to the backup section
Navigate to
/panel/configuracion/respaldo. Ensure you have the config:backup area enabled in your role.Click Generate backup
Click the Generate backup button under the database icon. A loading notification appears: “Generating backup…”
Backup endpoint
| Field | Value | Description |
|---|---|---|
type | database or images | Type of backup to generate |
database: .sql file attachment with headers:
images: .zip file attachment with headers:
Recommended backup frequency
| Frequency | Recommended scenario |
|---|---|
| Weekly | Normal platform operation |
| Before updates | Always before structural database changes |
| Monthly minimum | Platforms with low activity |
Restore accounts — /panel/configuracion/restaurar-cuentas
Lets you generate and send a new password to an existing user in the system. Useful when a user has lost access and cannot recover it themselves.
Users that can be restored
| Role (UI) | DB table | Login URL |
|---|---|---|
| Alumno | users | /auth/alumno |
| Tutor | tutors | /auth/tutor |
| Maestro | teachers | /auth/maestro |
| Administrador | admins | Admin panel |
The account
admin@montero.com cannot be restored through this tool. It returns a 403 Forbidden error.Restore workflow
Select the user role
In the dropdown, choose the user type whose account you want to restore: Alumno, Tutor, Maestro, or Administrador.
Click Restore
The button is disabled during processing to prevent duplicate submissions. A loading spinner with the text “Processing…” appears.
Email confirmation
If the restoration is successful, the system:
- Generates a random 12-character password.
- Hashes it with bcrypt (10 salt rounds).
- Updates the
passwordfield in the corresponding table. - Sends an email to the user with the new password and a direct link to their login page.
Restore endpoint
| Field | Type | Description |
|---|---|---|
role | string | User role in lowercase: alumno, tutor, maestro, or administrador |
email | string | User’s email address |
| Code | Message | Cause |
|---|---|---|
| 400 | Datos incompletos. | Missing role or email |
| 400 | Correo electrónico inválido. | Invalid email format |
| 400 | Rol inválido. | Role does not match any table |
| 403 | Esta cuenta no puede ser restaurada. | Attempt to restore admin@montero.com |
| 404 | La cuenta no existe. | Email not found in the role’s table |
| 502 | La contraseña fue actualizada, pero no se pudo enviar el correo. | Email service error |