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

ArgumentRequiredChoicesDescription
<destination>YesBackup destination path.

Required flags

None.

Optional flags

FlagValueDefaultChoicesDescription
--repostringLocal repository filesystem path.
--personalUse the configured personal repository.
--forceReplace an existing archive at the destination. The replacement is built and verified first; if that fails, the existing archive and last_backup stay unchanged.
--formatFORMATjson, tsv, csv, tableOutput format for command results.
--envPROFILEUse a configured CLI profile for this invocation.
--outPATHWrite output to a file path, or use - for stdout.
--openOpen browser-bound URLs when supported.
--no-retryDisable transient-error retries.
--retry-maxNMaximum transient-error retry attempts.
--waitBlock on async operations until a terminal state is reached.
--wait-timeoutSECONDS600Seconds to wait for --wait before timing out. Defaults to 600.
--allow-selfAllow mutating the currently active credential.
--timeoutSECONDSSet the per-request timeout budget in seconds.
--idempotency-keyKEYReuse an Idempotency-Key so ambiguous write failures can be retried with the same key.
--yesSkip confirmation prompts for destructive operations.
--debugPrint structured request debugging with secrets masked.
--verbosePrint verbose progress for long-running operations.
-h, --helpShow 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