Skip to main content

create_backup

Function create_backup 

Source
pub async fn create_backup(
    manager: &ShurikenManager,
    compression: Option<CompressionType>,
) -> Result<()>
Expand description

Creates a backup of all projects.

Compresses all projects into a tar.gz file with a timestamp in the filename. Stored in ~/.ninja/backups/ directory.

§Arguments

  • manager: Reference to the ShurikenManager
  • compression: Optional compression level (defaults to Normal if None)

§Returns

  • Ok(()) if backup succeeded
  • Err if file operations or compression fails