The gbm command line
Back up, restore and look after GBM AI from a terminal or a script: jobs, restores, licences, share credentials, S3 accounts and the service's account.
On this page
gbm.exe talks to the same background agent as the app, so a script and the window always agree. It is in the install folder, C:\Program Files\Genie9\GBM AI. To type just gbm in any terminal, turn on Settings ▸ Advanced ▸ Command-line access. gbm help lists everything below.
Jobs and runs#
| Command | What it does |
|---|---|
gbm status | what the agent is doing, the licence and the next run |
gbm job list | every job, its last run and whether it is on |
gbm job run <job> | runs it and follows it to the end; --full for a full backup, --copy for its second copy, --no-wait to return at once. A continuous job saves its changes as a point instead, and says "saved a point at 14:02" or "nothing changed since its last point" (10.5) |
gbm job stop <job> | stops the job's running or queued backup |
gbm job preview <job or file.json> | a dry run: what a backup would take; nothing is written |
gbm job validate <file.json> | checks a job file without saving it |
gbm job export <job> -o file.json | the job as JSON; the encryption password is left out |
gbm job import file.json | saves a job file as a new job (10.2) |
<job> is a job's name, the start of its name, or its id.
gbm job import takes the file Export job JSON… or gbm job export wrote, on this PC or another:
--name "<name>"gives the new job another name.- An encrypted job needs its password, which an export leaves out:
--password-stdinreads it from the input (type pw.txt | gbm job import job.json --password-stdin), or setGBM_PASSWORDfirst. - An S3 job names the S3 account of the PC it came from:
--s3-profile "<name>"uses one saved here instead (seegbm s3below).
Restore#
gbm restore --set <set> --to <folder | original> restores a set. <set> is a set's folder name, its id, its .bm2 file, or latest together with --job <job>. Add --path <path> (repeat it) for some files only, --flat to put every file straight into the folder, and --conflicts skip | newer | overwrite. An encrypted set's password: --password, GBM_PASSWORD, or you are asked.
Find, versions and history (10.6)#
| Command | What it does |
|---|---|
gbm find <name> | every saved file whose name or folder matches, in every backup, deleted ones marked (deleted from the PC); --deleted for those only, --kind documents (or images, video, audio, code, archives, mail) for one kind, --limit 200 for more than 50 |
gbm versions "<full path>" | the file's saved versions, newest first, with the point each is in: restore one with gbm restore --set <point> --path "<full path>" --to <folder> |
gbm history [<job>] | the backups that ran, newest first, as Activity lists them (a continuous job's points of one hour on one row); --limit 50 for more than 20 |
gbm continuous [<job>] | each continuously protected job: its state (protected, saving, waiting and why), its newest point, and what waits |
Each takes --json for scripts.
Licence#
gbm license status shows the edition and its dates; gbm license activate <key> activates a key.
Share credentials and S3 accounts (10.2)#
What Settings ▸ Network & credentials and the wizard's S3 accounts do, for a server with no window:
| Command | What it does |
|---|---|
gbm creds list | the saved credentials for network shares, and how many jobs use each |
gbm creds add \\server\share --user DOMAIN\user | saves a share's user and password |
gbm creds remove \\server\share | removes them |
gbm s3 list | the saved S3 accounts |
gbm s3 add <name> --access-key <id> --endpoint <url> --region <region> | saves one; leave --endpoint out for Amazon S3 |
gbm s3 remove <name> | removes one no job uses |
gbm remote list | the saved accounts of file servers and other clouds (10.6) |
gbm remote add <name> --kind sftp --host <server> --user <name> | saves an SFTP account: it shows the server's key first; type yes to trust it, or in a script add --trust SHA256:… with the fingerprint you checked. Other kinds: --kind ftp or ftps (--host, --user), webdav (--url, --user), azure (--account), gcs (--key-file with the service account's JSON) |
gbm remote test <name> | signs in with a saved account |
gbm remote remove <name> | removes one no job uses |
The password or secret key is never typed on the command line, where other programs could read it: --password-stdin or --secret-stdin reads it from the input, GBM_PASSWORD, GBM_S3_SECRET, GBM_REMOTE_SECRET or GBM_DB_PASSWORD holds it, or gbm asks for it without showing it. An SFTP private key can come from a file with --key-file.
The service's account (10.2)#
gbm service account shows the account the backup service runs as. gbm service account DOMAIN\user makes it run as that account, and gbm service account LocalSystem puts it back, as Settings ▸ Schedule & power ▸ Runs as does. The account must be in the PC's Administrators group; its password comes as above. Changing it needs a command prompt opened as administrator. See Running backups with nobody signed in.
In a script#
--json on any command prints the agent's own result objects, the ones the app reads. Exit codes: 0 done, 1 failed or stopped, 2 wrong usage, 3 the agent could not be reached, 4 done with skipped files.
Ask Genie, checkpoints and what changed (10.6)#
| Command | What it does |
|---|---|
gbm ai "back up D:\projects to E: every night, skip the junk" | Ask Genie drafts a job from your words: what it backs up, where, when, and a dry run with the files and size it would take and what the rules skip. Then it asks: r save and run now, s save only, n no, and takes the answer only from you typing it (never from a pipe). A new encrypted job asks for its password twice; a change to a job that is encrypted already keeps its password. Genie may ask a question first; type the answer |
gbm ai "..." --ask | sends the draft to GBM AI's window instead, where it waits on Home for your OK. Without a person at a terminal (a script, an AI assistant's shell), gbm ai never saves anything: it shows the draft, or sends it with --ask |
gbm ai why [<job>] | why a job's newest backup failed or skipped files, and what to do; with no job, the newest one that had a problem |
gbm checkpoint <folder> [--label "before the refactor"] | the job that backs the folder up saves a point now and keeps it for 7 days. See Checkpoints and Rewind |
gbm changes <folder> [--since <checkpoint, point or time>] | what was added, changed and deleted in the folder since the newest checkpoint, or since the one you name |
gbm signin you@example.com | signs this PC in to your Genie9 account, for Ask Genie: type the code the e-mail brings |
Ask Genie needs a signed-in account and counts against your monthly allowance, as it does in the window.
AI assistants (10.6)#
| Command | What it does |
|---|---|
gbm mcp | GBM AI as an MCP server on stdin and stdout, for AI assistants (Claude Code, Claude Desktop, VS Code, Cursor, Codex, Antigravity CLI). The assistant runs it; you do not run it yourself |
gbm mcp setup | the line to add GBM AI to each assistant, with this PC's path |
See AI assistants.