Aller au contenu principal

Database Backups

The Database Backups page within the System Administration module is the critical control surface for safeguarding your enterprise data. Given that the ERP system handles immutable financial data—including general ledger postings, payroll, and inventory valuations—the integrity and recoverability of the database is a fiduciary obligation required for strict GAAP/IFRS compliance.

This interface allows system administrators to configure automated backup schedules, trigger manual snapshots on-demand, and monitor the operational health of the backup infrastructure.

Accessing Backup Management

Navigate to System administration > Database backups.

The primary dashboard provides immediate visibility into the disaster recovery posture of your system:

  • System Status: Indicates whether the background backup worker is Idle or actively running a job.
  • Next Scheduled: Displays the exact timestamp (in UTC) for the next automated backup run.
  • Last Backup: Shows the completion status and timestamp of the most recent successful operation.
  • Retention Policy: Displays the current archival rules (e.g., retaining backups for 14 days) and the designated physical Storage Path on the server.

Backup History

The central grid provides an exhaustive audit log of all executed backups.

  • Type: Indicates if the backup was Automated (by the scheduler) or triggered Manually by an administrator.
  • Status: Indicates Completed or Failed.
  • Size: The compressed storage footprint of the backup file.

Selecting a specific row populates the Backup Details pane on the right, providing deep technical telemetry, including:

  • Checksum validation.
  • The exact PostgreSQL and Application versions at the time of the snapshot.
  • Raw Execution Logs detailing the output of the underlying pg_dump operation for troubleshooting.

Managing the Backup Schedule

To ensure continuous data protection, the system relies on an automated scheduler. Click Manage Schedule on the action toolbar.

The Backup Schedule Configuration dialog allows you to establish your organization's Recovery Point Objective (RPO) strategy.

Simple Configuration

For standard deployments, the Simple tab provides an intuitive interface:

  1. Enabled: Toggle to activate or suspend the automated scheduler.
  2. Frequency: Select the cadence (e.g., Daily).
  3. Execution Time: Define the precise time the backup should run. Best Practice: Schedule this during off-peak hours (e.g., 02:00 AM) to minimize disk I/O contention during active trading hours.

Advanced Configuration (Cron)

For complex scheduling requirements, select the Advanced tab. This allows you to input a standard Unix Cron Expression (e.g., 0 2 * * * for daily at 2 AM) directly into the scheduling engine.

Storage Policy

Regardless of the scheduling method, you must define the retention parameters:

  • Storage Path: The absolute directory path on the server where the encrypted backup files are written (e.g., /var/erp/backups).
  • Retention Days: The duration the system will preserve automated backups before purging them to reclaim disk space (e.g., 14 days).

Click Save to commit the schedule to the background worker.

Triggering a Manual Backup

Before executing major operational shifts—such as a fiscal year-end close or a massive data import—it is highly recommended to take an immediate snapshot of the database.

Click the Trigger Backup button on the action toolbar. This operation executes asynchronously. The System Status will transition to "Running," and upon completion, the new snapshot will appear in the history grid marked as Manual.

Restoring from a Backup

Destructive Operation

Restoring a database is an inherently destructive action that instantly overwrites the live environment, irrecoverably erasing any transactional data entered after the backup was taken.

To initiate a restore:

  1. Select a validated, Completed backup from the history grid.
  2. Click Restore on the action toolbar.
  3. You will be prompted with a series of mandatory, failsafe validations (including password re-entry and an active session warning) to prevent accidental execution.
  4. The system will automatically execute a "Pre-Restore Safety Backup" before applying the historical snapshot.