feature/paneles-nuevos-respaldos-crAS-trackeo-respaldos

This commit is contained in:
2026-07-02 08:42:04 -06:00
parent 8799a134f8
commit 928137bb20
24 changed files with 3582 additions and 794 deletions

View File

@@ -85,6 +85,13 @@ CREATE TABLE IF NOT EXISTS a24c.restore_targets (
ssh_password_encrypted TEXT, -- credencial SSH cifrada (AES-256-GCM)
remote_inbox_path VARCHAR(500), -- ruta en el server donde se sube el .bak y se restaura (C:\RestoreInbox)
notes TEXT,
-- Características de hardware (opcionales, capturadas a mano). Se usan para distribuir bases
-- por capacidad; el disco es la capacidad que manda. NULL = sin capturar.
os VARCHAR(50), -- Sistema operativo (Linux/Windows/…)
ram_gb INTEGER, -- RAM en GB
disk_gb INTEGER, -- Disco en GB
location VARCHAR(255), -- Ubicación (ej: Kansas City, United States)
size_category VARCHAR(20), -- Etiqueta: Chico | Mediano | Grande
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
@@ -117,6 +124,9 @@ CREATE INDEX IF NOT EXISTS idx_a24c_restore_job_logs_restored_at
ON a24c.restore_job_logs (restored_at);
CREATE INDEX IF NOT EXISTS idx_a24c_restore_job_logs_status
ON a24c.restore_job_logs (status);
-- Bitácora por servidor en el panel: últimas N restauraciones de un target.
CREATE INDEX IF NOT EXISTS idx_a24c_restore_job_logs_target_date
ON a24c.restore_job_logs (restore_target_id, restored_at DESC);
COMMENT ON TABLE a24c.restore_targets IS 'Servidores SQL Server destino de restauración (CloudRestoreAS). Contraseña cifrada AES-256-GCM.';
COMMENT ON TABLE a24c.restore_job_logs IS 'Bitácora de restauraciones reportadas por CloudRestoreAS.';