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
mobilebackup2tool.
Feature Flag
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "mobilebackup2"] }Service Names
| Path | Value |
|---|---|
| Lockdown | com.apple.mobilebackup2 |
| RSD | com.apple.mobilebackup2.shim.remote |
Rust Example
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
idevice-tools mobilebackup2Common Errors
| Error | What to check |
|---|---|
| Service not found | The device/iOS version does not advertise this service on the selected transport. |
| Connection failed | Check pairing, trust state, and whether the selected provider can reach the device. |
| Permission error | The service requires a device state, entitlement, or developer setting that is not active. |