idevice
Backup & Restore

MobileBackup2

Run backup and restore protocol operations through MobileBackup2.

MobileBackup2 exposes com.apple.mobilebackup2 through MobileBackup2Client. The module includes backup message types, restore options, and filesystem backup delegate support.

Use It For

  • Start MobileBackup2 protocol sessions.
  • Build restore options.
  • Handle backup protocol messages.
  • Back the bundled mobilebackup2 tool.

Feature Flag

Cargo.toml
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "mobilebackup2"] }

Service Names

PathValue
Lockdowncom.apple.mobilebackup2
RSDcom.apple.mobilebackup2.shim.remote

Rust Example

src/main.rs
use idevice::{
    IdeviceService,
    mobilebackup2::MobileBackup2Client,
};

let provider = first_provider().await?;
let mut client = MobileBackup2Client::connect(&provider).await?;
let backups = client.list_backups().await?;
println!("{backups:#?}");

CLI Equivalent

Terminal
idevice-tools mobilebackup2

Common Errors

ErrorWhat to check
Service not foundThe device/iOS version does not advertise this service on the selected transport.
Connection failedCheck pairing, trust state, and whether the selected provider can reach the device.
Permission errorThe service requires a device state, entitlement, or developer setting that is not active.

Source

On this page