repo:backup
Create and verify a local repository backup without contacting a service, then record its completion for this checkout. If recording fails, the verified archive remains restorable and the command reports its destination and digest.
Reference for flywheel repo:backup.
Create and verify a backup archive of the local repository, including its staging area. This runs entirely on the local copy: no credentials, no network, nothing published. Pair it with repo:restore to recreate the repository from the archive.
An existing destination is refused with repository_backup_exists. Pass --force to replace it: the new archive is built and verified first, then replaces the existing file and is recorded as last_backup. If building or verifying the replacement fails, the existing archive and the previous last_backup stay unchanged.
Command Group
Local Repository
Summary
Create and verify a local repository backup without contacting a service, then record its completion for this checkout. If recording fails, the verified archive remains restorable and the command reports its destination and digest.
Usage
flywheel repo:backup [FLAGS] <destination>Arguments
| Argument | Required | Choices | Description |
|---|---|---|---|
<destination> | Yes | Backup destination path. |
Required flags
None.
Optional flags
| Flag | Value | Default | Choices | Description |
|---|---|---|---|---|
--repo | string | Local repository filesystem path. | ||
--personal | Use the configured personal repository. | |||
--force | Replace an existing archive at the destination. The replacement is built and verified first; if that fails, the existing archive and last_backup stay unchanged. | |||
--format | FORMAT | json, tsv, csv, table | Output format for command results. | |
--env | PROFILE | Use a configured CLI profile for this invocation. | ||
--out | PATH | Write output to a file path, or use - for stdout. | ||
--open | Open browser-bound URLs when supported. | |||
--no-retry | Disable transient-error retries. | |||
--retry-max | N | Maximum transient-error retry attempts. | ||
--wait | Block on async operations until a terminal state is reached. | |||
--wait-timeout | SECONDS | 600 | Seconds to wait for --wait before timing out. Defaults to 600. | |
--allow-self | Allow mutating the currently active credential. | |||
--timeout | SECONDS | Set the per-request timeout budget in seconds. | ||
--idempotency-key | KEY | Reuse an Idempotency-Key so ambiguous write failures can be retried with the same key. | ||
--yes | Skip confirmation prompts for destructive operations. | |||
--debug | Print structured request debugging with secrets masked. | |||
--verbose | Print verbose progress for long-running operations. | |||
-h, --help | Show this help. |
Examples
Create and verify a local repository backup without contacting a service, then record its completion for this checkout. If recording fails, the verified archive remains restorable and the command reports its destination and digest.
flywheel repo:backup <destination> --format=json