--- title: "Maintenance & Automated Backups" description: "Disaster recovery, automated PostgreSQL database backups, system snapshots, and storage retention policies in Ring2All NMS." --- ## 📖 Introduction The **Maintenance & Backups** module provides enterprise disaster recovery capabilities for Ring2All NMS. Ensuring business continuity, the system orchestrates automated daily, weekly, and on-demand database dumps, packages configuration snapshots into compressed archives (`.tar.gz`), validates backup file integrity, and enables one-click restoration in disaster recovery scenarios. ![NMS Maintenance & Backups](/screenshots/nms/maintenance.png) --- ## 🎯 User Roles & Key Capabilities | Role | Primary Use Case | Key Capabilities | | :--- | :--- | :--- | | **Database & System Admins** | Disaster recovery preparedness and backup automation. | Create on-demand database dumps, schedule recurring backup jobs, and execute rollback restorations. | | **DevOps Engineers** | Pre-upgrade snapshots and environment cloning. | Generate full configuration and state snapshots before applying operating system or kernel updates. | | **Compliance Auditors** | Verifying data retention and recovery policies. | Audit backup frequency, verify off-site storage rotation, and review backup checksums. | --- ## 💾 Backup Pipeline & Retention Workflow ```mermaid graph LR Trigger[Manual Trigger or Cron Schedule] --> Dump[PostgreSQL pg_dump Engine] Dump --> Compress[gzip Compression & Checksum] Compress --> Storage[/var/backups/ring2all-nms/] Storage --> Retain[Prune Archives Exceeding Retention Limit] Storage --> Download[Direct Browser Download] Storage --> Restore[One-Click Database Restore] ``` ### 1. High-Performance Non-Blocking Dumps Backups utilize PostgreSQL `pg_dump` with custom binary and SQL formats. Operations execute with read-consistent snapshots, preventing table locks or interruption to active telemetry polling daemons. ### 2. Automated Retention & Disk Protection To prevent backup archives from exhausting disk capacity, Ring2All NMS automatically enforces retention policies: * **Retention Count**: Keeps the latest *N* backups (e.g., 7 daily, 4 weekly). * **Disk Space Safeguard**: Automatically warns administrators and halts backup creation if host disk space drops below 15%. ### 3. One-Click Restoration In the event of a host migration or database corruption, administrators can select any previous backup archive from the catalog and click **Restore Backup**. The engine terminates active connections, restores the schema and relational data, and restarts background daemons cleanly.