Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ChrisCore1/inventario_sud/llms.txt

Use this file to discover all available pages before exploring further.

Inventario SUD includes a built-in backup feature that lets an Obispo download a complete SQL dump of the database directly from the browser. The file contains INSERT statements for every record in the system and can be used to restore data to a fresh database instance or to keep an offline archive of your congregation’s inventory history.

Download a backup

1

Sign in as Obispo

You must be signed in with an account that has the Obispo role. The backup endpoint returns 403 Acceso denegado for all other roles.
2

Navigate to Configuración

Click Configuración in the sidebar to open the system settings page.
3

Click the backup button

In the Mantenimiento de base de datos section, click the download or backup button. The browser sends a GET request to /api/backup.
4

Save the file

The browser downloads a file named respaldo_inventario_YYYY-MM-DD.sql, where the date reflects the current day. Move the file to a secure, access-controlled location immediately after download.

Tables included in the backup

The backup exports every table in the following order to satisfy foreign key dependencies:
TableContents
RolRole definitions (Obispo and standard user role)
CategoriaAsset and consumable category types
UbicacionPhysical location names
UsuarioUser accounts including password hashes and biometric vectors
ArticuloFixed asset records including soft-delete flag
ConsumibleConsumable records with quantities and minimum stock levels
Movimiento_PrestamosLoan records including cancelled (soft-deleted) entries
Auditoria_logComplete audit log history
Each table is exported as a series of INSERT ... ON CONFLICT DO NOTHING statements.
The backup file contains bcrypt password hashes for all user accounts and 1024-dimension facial biometric vectors. Treat this file as highly sensitive. Store it in an encrypted location with restricted access, and delete it from shared or temporary storage immediately after use.
Because every INSERT uses ON CONFLICT DO NOTHING, re-importing the backup into an existing database is safe — rows that already exist are skipped rather than overwritten or duplicated. This makes the file suitable for additive restores, but it will not overwrite records that have been modified since the backup was taken.

Backup file format

The generated file opens with a header comment block followed by grouped INSERT statements, one per row. The format looks like this:
-- ==========================================
-- Copia de Seguridad: Inventario SUD
-- Generado el: 5/24/2026, 10:30:00 AM
-- Generado por: Nombre del Obispo
-- ==========================================

-- Tabla: Rol
INSERT INTO "Rol" (id_rol, nombre_rol) VALUES (1, 'Obispo') ON CONFLICT DO NOTHING;
INSERT INTO "Rol" (id_rol, nombre_rol) VALUES (2, 'Consejero') ON CONFLICT DO NOTHING;

-- Tabla: Usuario
INSERT INTO "Usuario" (id_usuario, nombre_usuario, email, password_hash, id_rol, biometria)
VALUES (1, 'Juan', '[email protected]', '$2b$10$...', 1, NULL) ON CONFLICT DO NOTHING;

Build docs developers (and LLMs) love