Aller au contenu principal

baastide restore

baastide restore​

Restore files through the local BaaStide agent

Synopsis​

The "restore" command asks the running agent to restore a snapshot of this machine into a directory. Use --list to list the snapshots. Run it as the same user as the agent (normally root). The repository credentials stay in the memory of the agent. SIGINT or SIGTERM cancels the restore; the files already restored stay on disk.

Exit status​

Exit status is 0 if the command was successful. Exit status is 1 if there was any error. Exit status is 130 if the restore was canceled (SIGINT or SIGTERM).

baastide restore [snapshot-id|latest] --target directory [flags]

Examples​

# List the snapshots of this machine (JSON)
baastide restore --list

# Restore the latest snapshot into /srv/restore
baastide restore latest --target /srv/restore

# Restore one snapshot by ID
baastide restore 4bba301e --target /srv/restore

Options​

-h, --help help for restore
--list list snapshots instead of restoring files
--socket path local agent socket path (default "/run/baastide/restore.sock")
-t, --target directory absolute destination directory

SEE ALSO​

  • baastide - Back up and restore this machine with BaaStide