Appliance Backup & Restore

The Athena virtual appliance can back itself up completely: the database, the certificate authority your agents trust, the install's secrets and keys, the saved settings and the licence. Everything goes into one archive encrypted with a passphrase you choose. Take a backup on demand or on a schedule, copy it automatically to an SMB share, a WebDAV folder or an S3-compatible bucket, and restore it later onto the same appliance or a fresh one. After a restore, enrolled agents keep working because the same CA comes back.

Everything on this page is under Settings → Appliance, in the Backup, Backup destinations and Restore sections. The same actions are available over the REST API and in the PowerShell module.

Appliance only

The Appliance tab only exists when Athena runs on the virtual appliance. On any other install it shows “This server does not run on the Athena appliance. Appliance settings exist only there.” The api/appliance/backup endpoints answer 404 (“Not an Athena appliance”). For other installs, see Database Backup & Maintenance and Data Directories & Backup.

What a full backup contains#

A full backup is a different thing from the database-only backup under Settings → Database:

Full appliance backup (this page)Database backup (Settings → Database)
DatabaseYesYes
Certificate authority (the Root CA agents trust)YesNo
Install secrets and the Data Protection key ring (they decrypt stored passwords and settings)YesNo
Saved settings, including the backup settings and destinations themselvesYesNo
LicenceYesNo
EncryptedYes, with your passphraseNo
Fileathena_full_<yyyyMMdd>_<HHmmss>.athbakathena_backup_<timestamp>.db

Not included: the large content under /data/storage (uploaded agent installers, deployment packages, session recordings), log files, and earlier backups. Keep separate copies of anything there that you can't upload again. See Data Directories & Backup for what lives where.

Who can use it#

PermissionAllows
appliance.viewSee the Appliance tab, the list of backups on the appliance, the backup settings and destinations (never their secrets), and the outcome of the last restore.
appliance.manageBack up now, download archives, change retention and the schedule, add, change, test and remove destinations, and restore.

Both are held by the built-in Admin role only by default. Users with appliance.view but not appliance.manage see the sections read-only, with the note “Read-only: changing this needs the appliance.manage permission.” See Permission Model & Role Bundles.

Backing up now#

  1. Open Settings → Appliance and scroll to Backup.
  2. Type a Passphrase of at least 12 characters, then type it again in Repeat the passphrase. Backup now stays disabled until the two match and the passphrase is long enough.
  3. Click Backup now. Athena writes the archive and then copies it to every enabled destination. Under the button you see “Written: file (size)” and one line per destination with its result.
Keep the passphrase somewhere safe

Athena does not store the passphrase for Backup now. Without it the archive cannot be opened by anyone, including SealGrid support, so a lost passphrase means the backup cannot be restored. Put it in your password manager or safe before you rely on the backup.

Only one backup runs at a time. If a scheduled backup is already running, a second request is refused with “A backup is already running”.

How the archive is protected#

The archive is encrypted with AES-256-GCM. The key comes from your passphrase through PBKDF2-HMAC-SHA256 with 600,000 iterations and a random salt for every archive. Every part of the file is authenticated, so a changed, reordered, cut-short or extended archive is rejected when it is checked for restore, the same way a wrong passphrase is. Archives are written to the appliance's backup folder (/data/athena/backups) readable only by the Athena service.

Backups on this appliance#

The Backups on this appliance table lists every full backup, newest first, with its File name, Size and Created time. With appliance.manage, the download button on a row saves that encrypted archive through your browser. Every download is audited. If there are none yet, the table reads “No full backups yet.”

Retention and schedule#

FieldDefaultWhat it does
Backups to keep71–365. After every backup, only the newest N archives are kept on the appliance and on each destination; older ones are deleted.
Back up on a scheduleOffRuns a full backup unattended, followed by the copies to every enabled destination.
Schedule (cron)0 2 * * *Minute, hour, day, month, weekday in the appliance's time zone. The default is every day at 02:00.
Passphrase for scheduled backups—Required the first time you switch the schedule on (12+ characters). Afterwards the box shows “(stored - leave empty to keep it)”; type a new one only to change it.

Click Save to apply. The schedule appears in the Scheduler as the job Appliance full backup.

A schedule stores the passphrase

To run unattended, scheduled backups keep their passphrase on the appliance, encrypted with the appliance's own keys. Anyone who controls the appliance can then produce backups with it. Turning the schedule off forgets the stored passphrase, so you must enter it again if you switch the schedule back on.

Retention only ever deletes files named like a full backup (athena_full_<date>_<time>.athbak). Other files in the same share, folder or bucket prefix are never touched.

Backup destinations (off-box copies)#

Backups on the appliance share a disk with the live data, so for real disaster recovery copy them somewhere else. Under Backup destinations, click Add destination. Every backup, manual or scheduled, is then uploaded to each enabled destination. If one destination fails, the others still get their copy. If there are no destinations, the section reads “No destinations: backups stay on this appliance only.”

TypeLocationOther fieldsNotes
SMB share Share path, e.g. \\fileserver\backups\athena (\\server\share or \\server\share\folder; forward slashes also work) Domain (optional), User (required), Password SMB 2/3 over TCP 445. The path may not contain . or .. segments.
WebDAV (HTTPS) Folder URL (https), e.g. https://cloud.example.com/remote.php/dav/files/me/athena Authentication: User + password or Bearer token; Extra CA certificate (PEM, optional) HTTPS only. The server certificate is checked normally. If your WebDAV server uses an internal CA, paste that CA here. The host name must still match the certificate.
S3-compatible Endpoint URL, e.g. https://<account>.r2.cloudflarestorage.com Bucket (required), Region (empty = us-east-1; Cloudflare R2: auto), Folder (key prefix), e.g. athena/site-a, Access key ID, Secret access key Path-style addressing. Works with AWS S3, MinIO, Cloudflare R2, Wasabi and Backblaze B2. Athena never creates or lists buckets, so an object-only key scoped to the one bucket is enough. It needs to write, list and delete objects (for retention and the connection test).

Athena checks the whole destination when you save it, including the URL scheme, the share path and the required fields. It rejects an incomplete one with a message, for example “The WebDAV URL must be an https:// URL” or “The S3 bucket is required”. The Type of an existing destination can't be changed; add a new destination instead. Clear Upload backups here to pause a destination without deleting it. The table then shows it as (off).

Passwords, bearer tokens and secret keys are stored encrypted and are never shown again, not in the console and not through the API. When you edit a destination, leave the secret empty to keep the stored one. For WebDAV, tick Remove the stored CA to drop an extra CA you added earlier.

Testing a destination#

Use the Test connection button on a destination's row before the first real backup. Athena writes a small test file, checks that it appears in the listing, and deletes it again. On success it reports “Connected: write, list and delete work”. The result is also recorded in the destination's Last result column, as is every real upload: an OK or Failed badge, the time, and the message (for example “Uploaded; 2 older copies removed (keeping 7)”). A destination that has not been used yet reads “Not used yet”.

Removing a destination (Remove destination → Remove) only stops future copies. Backups already copied there are left in place.

Firewall

Destinations are reached from the appliance. Allow outbound TCP 445 to an SMB server, and outbound HTTPS (usually 443, or the port in your URL) to a WebDAV server or S3 endpoint. In an air-gapped site, point the destination at an internal file server, WebDAV server or S3-compatible store such as MinIO. See Network Ports & Firewall.

Restoring a backup#

Use Restore to bring an appliance back to a backup's state. This can be the same appliance after a bad change, or a freshly deployed appliance that replaces one you lost. Because the backup carries the CA, a fresh appliance restored from it is trusted by the agents that were enrolled with the old one.

  1. In Settings → Appliance → Restore, click Upload backup and choose the .athbak file. A progress bar shows the upload; archives of any size are accepted.
  2. Enter the Backup passphrase and click Check backup. Athena decrypts the archive and verifies every file. Nothing changes yet.
  3. Review what the backup brings back:
    • Backup taken: the date and the machine it was taken on.
    • Athena build: the backup's build, next to the build installed now.
    • CA thumbprint: marked same CA as now or replaces the current CA.
    • Contents: the number of files and their total size.
  4. Type RESTORE in the confirmation box and click Restore, or Cancel to discard the checked copy.
  5. Athena restarts. The page shows “The appliance is restarting. The web console is unavailable for a few minutes; this page reloads itself when the server is back.”
A restore replaces the appliance's state

The appliance's database, CA, secrets, keys, settings and licence are replaced with the backup's. Changes made since the backup was taken are lost. If the backup holds no licence, the appliance keeps the licence it has. If the CA is marked replaces the current CA, agents that enrolled with the current CA after the backup was taken will no longer trust the server and must be re-enrolled. See Certificates & PKI.

Automatic rollback#

The swap happens while Athena starts, before it opens the database or the CA. The previous state is set aside first and kept on the appliance. If the restored server does not finish starting, the next start puts the previous state back by itself. The Restore section then reports the outcome of the last restore:

MessageMeaning
A restore is staged and is applied when Athena restarts.The restore was accepted but Athena has not restarted yet. If the restart was refused, the restore is applied at the next start.
The backup from date was restored at time; waiting for the server to start.Files swapped; the server is still starting.
Last restore: the backup from date, restored at time.The restore completed and the server started on it.
The restore of the backup from date was rolled back at time: reasonThe restored server did not start, or the files could not be swapped, so the pre-restore state was put back.

When a restore is refused#

A backup taken while the appliance ran on PostgreSQL restores onto SQLite. Migrate to PostgreSQL again afterwards if you want to keep using it.

Audit trail#

Every backup and restore action is written to the audit log. Secrets and passphrases never appear in it.

Event typeRecorded when
ApplianceBackupCreatedA full backup was written. Action Manual or Scheduled; the resource is the archive name. The description includes the size, file count and CA thumbprint.
ApplianceBackupUploadedA copy to a destination succeeded (Information) or failed (Error). Action Upload, or Test for a connection test.
ApplianceBackupDownloadedAn archive was downloaded through the browser or the API (Warning).
ApplianceBackupSettingsChangedRetention or the schedule changed, or a destination was added, changed or removed (Warning).
ApplianceRestoreAction Validate (an archive checked or refused), Request (restore requested; Critical, recorded before the restart), then Completed or RolledBack once the server is back.

See the Audit Event Types Reference for every event type.

REST API#

All endpoints are under api/appliance/backup, return the usual { success, message, data } envelope (except the download, which is the file itself), and answer 404 off the appliance.

Method & pathPermissionPurpose
GET api/appliance/backup/settingsappliance.viewRetention, schedule, whether a passphrase is stored, and the destinations (secrets are never returned; hasSecret / hasCaPem instead).
PUT api/appliance/backup/settingsappliance.manageBody { retention, scheduleEnabled, cron, passphrase }. The passphrase is required the first time the schedule is switched on.
GET api/appliance/backupappliance.viewThe archives on the appliance, newest first.
POST api/appliance/backupappliance.manageBack up now. Body { "passphrase": "…" }. Returns the file name, size, CA thumbprint and each destination's outcome. 409 while another backup runs.
GET api/appliance/backup/{name}/downloadappliance.manageDownloads one archive.
POST api/appliance/backup/destinationsappliance.manageAdds a destination (type = smb, webdav or s3).
PUT api/appliance/backup/destinations/{id}appliance.manageChanges a destination. An empty secret keeps the stored one; clearCaPem: true removes the extra CA.
DELETE api/appliance/backup/destinations/{id}appliance.manageRemoves a destination (copies already there stay).
POST api/appliance/backup/destinations/{id}/testappliance.manageTest connection (write, list, delete a test file).
PUT api/appliance/backup/restore/uploadappliance.manageRestore step 1: the .athbak file as the raw request body. Returns an upload id.
POST api/appliance/backup/restore/validateappliance.manageRestore step 2: body { uploadId, passphrase }. Returns the preview; 400 for a wrong passphrase, a modified archive or a newer build.
POST api/appliance/backup/restore/{id}/applyappliance.manageRestore step 3: body { "confirm": "RESTORE" }. Returns 202; Athena restarts.
GET api/appliance/backup/restoreappliance.viewThe last restore's outcome, and whether a staged restore is waiting for a restart.

To authenticate scripts, see API Tokens and the API Reference.

PowerShell#

The Athena PowerShell module wraps the same API. Passphrases and secrets are taken as SecureString.

CmdletWhat it does
Get-AthenaApplianceBackupSettingsRetention, schedule and destinations.
Set-AthenaApplianceBackupSettings-Retention (1–365), -ScheduleEnabled, -Cron, -Passphrase. Only the parameters you pass change.
Get-AthenaApplianceBackupLists the archives on the appliance, newest first.
Start-AthenaApplianceBackupBacks up now with -Passphrase (12+ characters) and copies to every enabled destination.
Save-AthenaApplianceBackupDownloads an archive (-Name, -Path folder or file, -Force to overwrite).
Get-AthenaBackupDestinationLists destinations, or one by -Id.
New-AthenaBackupDestination-Name, -Type smb|webdav|s3, -Location, plus -Bucket, -Region, -Prefix, -Domain, -Username, -Secret, -Auth basic|bearer, -CaCertificatePem / -CaCertificatePath, -Disabled.
Set-AthenaBackupDestinationChanges the fields you pass (-Id; -Enabled; -ClearCaCertificate). Without -Secret the stored secret is kept.
Remove-AthenaBackupDestinationRemoves a destination (asks for confirmation unless -Force).
Test-AthenaBackupDestinationTests a destination.
Restore-AthenaApplianceBackup-Path to the .athbak file, -Passphrase. Asks for confirmation, then restores and restarts Athena. -ValidateOnly (or -WhatIf) only checks the archive and returns the preview.
Get-AthenaApplianceRestoreThe outcome of the last restore.
# Nightly backup at 02:00 appliance time, keep 14
Set-AthenaApplianceBackupSettings -Retention 14 -ScheduleEnabled $true -Cron '0 2 * * *' `
  -Passphrase (Read-Host -AsSecureString 'Backup passphrase')

# Copy every backup to a Windows file share, then test it
New-AthenaBackupDestination -Name nas -Type smb -Location '\\nas01\backups\athena' `
  -Domain CORP -Username svc-backup -Secret (Read-Host -AsSecureString)
Get-AthenaBackupDestination | Test-AthenaBackupDestination

# Download the newest archive
Get-AthenaApplianceBackup | Select-Object -First 1 | Save-AthenaApplianceBackup -Path D:\Backups

# Check an archive without restoring it
Restore-AthenaApplianceBackup -Path .\athena_full_20261014_020000.athbak -Passphrase $p -ValidateOnly

Troubleshooting#

SymptomCause and fix
“Backup file written, but N destination(s) failed - see Destinations”The archive is safe on the appliance; only the copy failed. Read the destination's Last result message, fix it, and run Test connection. The next backup copies again.
“SMB: cannot connect to server:445”The appliance can't reach the file server on TCP 445. Check routing and firewalls between them.
“SMB login to server as user failed: …”Wrong user, password or domain. Re-enter the password (it is never shown, so type it again).
WebDAV or S3 errors that quote HTTP 401 / 403The credential is wrong or lacks rights. S3 keys need to write, list and delete objects in the bucket.
A WebDAV certificate errorPaste the issuing CA into Extra CA certificate (PEM, optional), and use the host name that is on the server's certificate in the URL.
“Scheduled backups need the passphrase once…”You switched the schedule on without a stored passphrase. Enter Passphrase for scheduled backups and save.
“The upload is gone - upload the archive again”A failed check discards the upload. Upload the file again.
The restore was rolled backThe message gives the reason. The appliance is back on its previous state. Check the server log, or contact support@sealgrid.ai.