Security and safety

Operational rules for protecting database credentials and avoiding destructive mistakes.

How credentials reach PostgreSQL

Gaet passes the database password to psql, pg_dump, and pg_restore through the child process environment as PGPASSWORD, never as a command-line argument. Every call also uses -w, so a missing password fails instead of hanging on a prompt.

The environment file is written with 0600 permissions, and the configuration API rewrites it with the same mode. The backup lock file is also created with 0600.

chmod 600 ~/.gaet/.env

Shell history

gaet remote set-url and gaet set accept secrets as arguments, which an interactive shell may write to history. Prefer the dashboard configuration form, the POST /api/config endpoint, or an environment variable when history is a concern.

Remote TLS

GAET_REMOTE_SSLMODE defaults to prefer. Use require or verify-full when the remote server supports it, and avoid disable outside a trusted network.

gaet set GAET_REMOTE_SSLMODE=verify-full

Dashboard exposure

The dashboard has no built-in authentication and exposes configuration writes, snapshot downloads, and database operations. Keep it on a trusted interface, restrict the port with a firewall, or put an authenticating reverse proxy in front of it.

Destructive commands

CommandEffect
gaet pushResets and replaces objects in the remote database
gaet fetchResets and overwrites the local database
gaet restoreResets the local target before importing a snapshot
gaet uninstallRemoves configuration, scheduler units, and snapshots unless --save is used

Use --dry-run where available and confirm the target before adding --yes. In a non-interactive session, fetch, restore, and uninstall refuse to run without it.

Concurrency

A lock file prevents overlapping backup operations. If a process is killed mid-run, confirm no operation is active before removing a stale lock.