restore
Restore a path in your working directory from the latest snapshot
Usage
aegis restore [OPTIONS] <PATH>
Arguments
| Argument | Description |
|---|---|
PATH | The path to restore, relative from the root of the repo |
Options
| Option | Description |
|---|---|
--repo | Specify a path to a repo to use instead of the current working directory |
--backend | Use a specific backend instead of the one specified by default_backend in aegis.toml |
--snapshot | A query specifying the snapshot to use.
This can be "latest", a snapshot root checksum, or an index number.
Use aegis list-snapshots --backend {backend name} to get checksums/indexes.
(default: |
Description
The restore command retrieves a file or directory from the latest snapshot and writes it to
your working directory. Use this to recover accidentally deleted or modified files.
The path must be relative to the repository root (where aegis.toml is located).
The path must exist in the snapshot, and for safety, it must not exist on disk. This is to prevent accidental overriding of files which may have changed since the last snapshot, however this may change in the future.
Examples
# Restore a single file:
aegis restore documents/report.pdf
# Restore a directory
aegis restore documents/
# Restore from a Specific Backend
aegis restore --backend cloud documents/report.pdf