@@ -11,8 +11,8 @@ use std::process;
1111use api:: { ApiClient , ApiError , EXIT_SUCCESS } ;
1212use cli:: {
1313 AccountApiKeyCommands , AccountCommands , AccountSecretCommands , AccountSshKeyCommands ,
14- AuthCommands , BackupCommands , Cli , Commands , DbCommands , DbExportCommands ,
15- DbImportSessionCommands , DeployCommands , EnvCommands , EnvDbCommands ,
14+ AuthCommands , BackupCommands , BackupDownloadCommands , Cli , Commands , DbCommands ,
15+ DbExportCommands , DbImportSessionCommands , DeployCommands , EnvCommands , EnvDbCommands ,
1616 EnvDbImportSessionCommands , EnvSecretCommands , EventCommands , McpCommands , RestoreCommands ,
1717 SiteCommands , SiteSshKeyCommands , SslCommands , WafAllowedReferrerCommands ,
1818 WafBlockedIpCommands , WafBlockedReferrerCommands , WafCommands , WafRateLimitCommands ,
@@ -634,6 +634,24 @@ fn run_backup(command: BackupCommands, format: OutputFormat) -> Result<(), ApiEr
634634 scope,
635635 description,
636636 } => backup:: create ( & client, & site_id, & scope, description, format) ,
637+ BackupCommands :: Download { command } => run_backup_download ( & client, command, format) ,
638+ }
639+ }
640+
641+ fn run_backup_download (
642+ client : & ApiClient ,
643+ command : BackupDownloadCommands ,
644+ format : OutputFormat ,
645+ ) -> Result < ( ) , ApiError > {
646+ match command {
647+ BackupDownloadCommands :: Create { site_id, backup_id } => {
648+ backup:: download_create ( client, & site_id, & backup_id, format)
649+ }
650+ BackupDownloadCommands :: Status {
651+ site_id,
652+ backup_id,
653+ download_id,
654+ } => backup:: download_status ( client, & site_id, & backup_id, & download_id, format) ,
637655 }
638656}
639657
0 commit comments