Create Your First Backup¶
Sign in through the tunnel from Connect Using AcuGIS Connect. The home page is Backup Jobs. Its subtitle is Manage backup jobs, schedules, and destinations.
You need a destination before a remote copy can succeed. Browser download is always available. Remote destinations are added in Configure Backup Destinations.
A new job is enabled. The form does not edit a job after it is saved. To change paths, databases, or the destination, create another job. Delete removes the job and its future schedule. History and existing backup files are kept. Delete is refused while that job has a backup running.
File-system backup¶
A file-system job writes one zstd-compressed tar archive. The file name looks like <job>_<UTC timestamp>_<run id>.tar.zst.
Every path must sit under a directory listed in allow_roots in /etc/acugis-backup/config.yaml. The acugis-backup user must already be able to read each path. The service does not change privileges. Paths under /home also need a BindReadOnlyPaths entry. Both steps are in Install AcuGIS Backup.
- On Backup Jobs, click Create Backup Job.
- Enter a Name, up to 80 characters.
- Set Backup type to File System.
- Set Destination to Browser download or to a destination you already saved.
- Under File System, enter the source.
- Under Schedule and retention, leave Manual selected for this first run. Successful backups to keep starts at
30. - Click Create job.
The File System fields are one path per line:
| Field | What to enter |
|---|---|
| Directories | Absolute directories to archive. |
| Files | Absolute files to archive. |
| Exclude patterns | Relative patterns, using /, that apply only inside the selected directories. An empty list archives the selected paths without exclusions. |
The form lists Allowed roots from the configuration. A path outside those roots is rejected. /root, /etc itself, and credential files such as /etc/shadow are rejected. At least one directory or file is required. Two selected paths must not overlap.
Example, when /var/lib/acugis is an allowed root:
/var/lib/acugis
An exclude pattern such as *.log is relative to a selected directory. A pattern that starts with / or contains .. is rejected.
Run it¶
- On Backup Jobs, find the job. Job status is Enabled. Last run is Not run.
- Click Backup now.
- Click the status in Last run to open Backup status.
While the run is in progress, the status is Running and the page refreshes. When it finishes, Status is Successful and Verification is Verified for an archive that was read back successfully.
Open the run's Files table. A browser-download archive has a Download link. A remote destination shows the remote location after the upload matches. The Size is the compressed archive.
PostgreSQL backup¶
A PostgreSQL job runs pg_dump once for each selected database. Each dump uses plain SQL format and UTF-8, and AcuGIS Backup gzip-compresses it to <database>_<UTC timestamp>_<run id>.sql.gz. The service does not change roles, pg_hba.conf, or database contents.
Set pg_dump_path and psql_path in /etc/acugis-backup/config.yaml before you use this job type. See Install AcuGIS Backup.
Save a connection¶
- Click Connections.
- Click New connection.
- Enter the fields and click Save connection.
| Field | What to enter |
|---|---|
| Name | A name for this connection, up to 80 characters. |
| Host | Leave empty to use the local socket. Otherwise the host name PostgreSQL is listening on, as seen from this server. |
| Port | Starts at 5432. |
| Socket directory | Starts at /var/run/postgresql. Used when Host is empty. |
| Username | Database role. Starts at acugis-backup. |
| Authentication | Peer or Password. |
| Password | Required for Password. Encrypted after save and not shown again. |
Peer stores no password. pg_dump connects through the local socket as the operating-system user acugis-backup. pg_hba.conf must accept that user. When the database role name is different from acugis-backup, pg_ident.conf must map the operating-system user to that role.
Password stores an encrypted password and passes it to pg_dump through a temporary password file. The cluster must allow password authentication for that role.
The role needs CONNECT on each selected database and enough privilege for pg_dump to read the objects that should be in the backup. Listing databases connects to the database named postgres, so that role also needs permission to connect to postgres.
The connections page does not edit or delete a saved connection. Create a new connection to use different settings.
Create the job¶
- Click Backups, then Create Backup Job.
- Enter a Name.
- Set Backup type to PostgreSQL.
- Set Destination.
- Set Connection to the connection you saved.
- Click List databases.
- Select one or more databases.
- Leave Manual selected for this first run.
- Click Create job.
List databases must succeed before the checkboxes appear. If no connection exists yet, the form links to Create a PostgreSQL connection.
Run it¶
Click Backup now on the job, then open the run. A successful PostgreSQL run has one file per database. The Database column names the source database. Verification is Verified after the gzip checksum matches and the dump contains a pg_dump header.
Understand the result¶
Use Backup status and History to tell these outcomes apart.
| What you see | Meaning |
|---|---|
| The job appears on Backup Jobs with Enabled | The job was saved. Nothing has been backed up yet when Last run is Not run. |
| Running | This run has started. The page refreshes until it finishes. |
| Successful, with Verification Verified | The archive was produced and the checks for that job type passed. For a remote destination, the stored object also matched the archive. |
| Failed | The run stopped with an error. The error text is on the run page and in the Error column of History. |
| A remote error such as S3 object size does not match, remote SHA-256 does not match, or The GCS checksum does not match | The archive was not accepted at the destination. The local staging copy for that remote job is not kept as a successful download. |
| Verified | The checks below passed. It is the verification state, not a restore test. |
Before a run is marked successful, AcuGIS Backup checks the archive:
- A file-system archive is opened again and every tar entry is read.
- A PostgreSQL dump is checked as gzip, including the gzip checksum, and must contain a
pg_dumpheader (PostgreSQL database dump). - An S3 or SFTP upload is accepted only when the stored object matches the archive size and SHA-256.
- A Google Cloud Storage upload is accepted only when the stored object matches the archive size and CRC32C.
Successful means those checks passed for the paths or databases in the job. It does not mean an entire system can be recovered. AcuGIS Backup does not restore data. Test recovery with tools that can read .tar.zst or .sql.gz, as described in Security.
The next page covers schedules, history, retention, and cancellation: Schedule and Monitor Backups.