CI/CD integration
Run Gaet safely in a non-interactive pipeline.
Global flags for automation
FlagEffect
-q, --quietSuppress non-essential output--plainPipe-safe output without ANSI colors--jsonMachine-readable output on supported commands-y, --yesAuto-confirm destructive promptsExit codes
CodeMeaning
0Success1General failure2Usage error or unknown command80Configuration error81Local database unavailable82Remote database unavailable83Operation locked by a running backup84Required PostgreSQL tools missingValidate before mutation
gaet check --jsonStop the job when the check fails. The CLI help documents a shell pattern for this:
gaet check --json | jq '.ok'Run a backup
gaet push --jsonProvide credentials through the CI secret manager as environment variables. Process environment variables take priority over the Gaet environment file.
GAET_LOCAL_URL=postgresql://user:pass@127.0.0.1:5432/app
GAET_REMOTE_URL=postgresql://user:pass@db.example.com:5432/appGitHub Actions
- name: Verify Gaet
run: gaet check --json
- name: Push backup
run: gaet push --json
env:
GAET_LOCAL_URL: ${{ secrets.GAET_LOCAL_URL }}
GAET_REMOTE_URL: ${{ secrets.GAET_REMOTE_URL }}Destructive workflows
gaet fetch --yesgaet restore latest --yesFetch and restore overwrite the local database. Run them only in a job whose target has been selected intentionally, and gate the step behind an environment approval.
Pipeline checks
gaet status --json
gaet snapshots --json
gaet doctor --jsonNotifications
gaet push accepts --notify=URL to post the result to a webhook, which lets a pipeline surface backup failures without parsing output.