pub fn rollback(backup_path: &Path, target_path: &Path) -> Result<()>Expand description
Rollback to a previous version from backup
Restores a backed-up binary to the original location.
§Arguments
backup_path- Path to the backup filetarget_path- Path where to restore the binary
§Returns
Ok(())- SuccessErr(anyhow::Error)- Error if rollback fails
§Example
use terraphim_update::rollback;
use std::path::Path;
rollback(
Path::new("/usr/local/bin/terraphim.bak-1.0.0"),
Path::new("/usr/local/bin/terraphim")
)?;