Skip to main content

harmont_cli/commands/cache/
restore.rs

1use std::path::Path;
2
3use anyhow::Result;
4
5/// Restore cached VM snapshots from a directory.
6///
7/// This is a placeholder after the Docker-to-VM migration. The VM
8/// backend manages snapshots internally via `ImageRegistry`; external
9/// save/restore is not yet implemented.
10///
11/// # Errors
12///
13/// Currently always succeeds.
14#[allow(clippy::print_stderr)]
15pub async fn handle_restore(dir: &Path) -> Result<i32> {
16    tracing::info!(
17        path = %dir.display(),
18        "cache restore is not yet implemented for the VM backend",
19    );
20    eprintln!("restored 0/0 snapshots (VM backend — not yet implemented)");
21    Ok(2)
22}