CLI reference

norcube backup restore-tests run

Restore-test one backup into a throwaway database, right now

Not verified yet

Enqueue an on-demand restore test of a backup: the one you name, or the data source's newest successful backup.

The backend restores the backup into a disposable database (one it spins up just for the test, or the scratch server configured for the datasource), confirms the data came back, and destroys the copy. The database being backed up is never touched.

The verdict (Passed / Passed with warnings / Failed) appears next to the backup in norcube backup jobs list and rolls into norcube backup health. With --wait the command waits for the verdict and exits 1 (code job_failed) unless the test passed, which makes it a CI gate.

Usage

norcube backup restore-tests run [backup-job-id] [flags]

Examples

# Test the newest successful backup and wait for the verdict
norcube backup restore-tests run --datasource 9f8e7d6c-… --wait

# Test a specific backup (an id from `norcube backup jobs list`)
norcube backup restore-tests run 6a1b2c3d-… --datasource 9f8e7d6c-…

Flags

FlagDefaultDescription
-d, --datasourceDatasource the backup belongs to (id)
--waitWait until the restore test finishes (Ctrl-C stops waiting, not the restore test)
--wait-timeout2h0m0sGive up waiting after this long (the job keeps running on the server)

Every command also takes the global flags: --profile, --org, -o, --query, --debug and more.

See also

On this page