idevicebackup2
Back up data from iOS devices
TLDR
Create a backup of the device in the specified directory
Restore a backup from the specified directory
Enable encryption for backups
List the files in the last completed backup
SYNOPSIS
idevicebackup2 [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS/ARGUMENTS]
Available Commands:
backup [DIR]
restore DIR
list
info [BACKUP_ID]
browse BACKUP_ID
delete BACKUP_ID
PARAMETERS
backup [DIR]
Creates a backup of the connected iOS device. If DIR is not specified, a default location is used.
restore DIR
Restores the connected iOS device from the specified backup DIR.
list
Lists all available backups managed by idevicebackup2.
info [BACKUP_ID]
Displays detailed information about a specific backup identified by BACKUP_ID. If no BACKUP_ID is provided, it shows info for all backups.
browse BACKUP_ID
Allows browsing the file contents of a specific backup identified by BACKUP_ID.
delete BACKUP_ID
Deletes a specific backup identified by BACKUP_ID from disk.
--help, -h
Displays the help message and exits.
--version, -v
Displays version information and exits.
--udid UDID, -u UDID
Specifies the 16-character UDID of the device to connect to. Useful when multiple devices are connected.
--debug, -d
Enables verbose debug output for troubleshooting.
--disable-encryption
Disables encryption for the backup process. Backups will be stored unencrypted.
--password PASS, -p PASS
Sets the password for encrypted backups or for restoring from an encrypted backup.
--full-backup, -f
Performs a full backup of the device, regardless of previous backups.
--incremental-backup, -i
Performs an incremental backup, only backing up changes since the last backup. This is the default behavior if neither -f nor -i is specified explicitly.
--system-buid BUILDSYS
Sets the system build ID for the backup, typically for specific firmware versions.
--internal-path PATH
Specifies an internal path within the backup for operations like export/import.
--export
Exports a file or directory from a backup (SRC) to a local destination (DST) from the specified backup ID.
--import
Imports a file or directory (SRC) into a backup (DST) for the specified backup ID.
--copy
Copies a file or directory from one location (SRC) to another (DST) within the specified backup ID.
--manifest
Used with 'browse' or 'info' commands to show raw manifest information.
--display-errors, -D
Displays detailed errors instead of exiting silently, useful for scripting.
--skip-apps, -s
Skips backing up application data during the backup process.
--passcode
Provides the device passcode to unlock the device for operations, if required.
DESCRIPTION
idevicebackup2 is a powerful command-line tool within the libimobiledevice suite, designed for managing backups and restores of iOS devices (iPhone, iPad, iPod touch) on Linux and other Unix-like operating systems. It empowers users to create full or incremental backups, restore devices from existing backups, list available backups, browse specific backup contents, and efficiently delete old backups. This tool provides a robust, open-source alternative to iTunes or Finder for users who prefer a command-line interface or operate on non-Windows/macOS platforms. It supports both unencrypted and password-protected encrypted backups, offering flexibility and security. idevicebackup2 handles various aspects of the backup process, from file synchronization to manifest management, making it an essential utility for comprehensive iOS device management without proprietary software.
CAVEATS
idevicebackup2 requires the libimobiledevice libraries and dependencies to be properly installed and configured on your system.
Physical access to the iOS device is often required to approve a 'Trust This Computer' prompt when connecting for the first time or after certain updates.
For encrypted backups, remembering the password is critical, as there is no recovery mechanism if it's lost.
Backup and restore operations can be time-consuming and require significant free disk space, potentially multiple times the device's storage capacity.
Compatibility with the very latest iOS versions might sometimes lag behind Apple's releases, requiring updates to libimobiledevice.
This tool does not interact with or manage iCloud backups.
BACKUP LOCATIONS
By default, idevicebackup2 stores backups in a directory structure mirroring Apple's backup format, often in ~/.config/idevicebackup/ or a user-specified path. Each backup is stored in a unique folder identified by the device's UDID and a timestamp or backup ID.
ENCRYPTION
idevicebackup2 supports both unencrypted and password-protected encrypted backups. When creating an encrypted backup, it's paramount to remember the password, as there is no recovery mechanism if it's lost. The password is required for subsequent restores from that backup.
INCREMENTAL VS. FULL BACKUPS
The tool can perform incremental backups, which only store changes since the last backup, significantly saving disk space and time. This is the default behavior if not specified. Alternatively, a full backup can be forced, capturing the entire device state regardless of previous backups, which is useful for initial backups or when desiring a complete snapshot.
HISTORY
idevicebackup2 is an integral part of the libimobiledevice project, an open-source initiative that provides cross-platform protocol libraries for communicating with iOS devices. This project originated around 2007-2008 as a reverse-engineering effort to interact with Apple devices without relying on iTunes or proprietary drivers. Its goal was to enable Linux and other Unix-like systems to manage iPhones, iPads, and iPods. idevicebackup2 emerged as a crucial component for enabling local backup and restore capabilities, offering a robust and flexible alternative for users and developers on non-Apple platforms. Its development is ongoing, adapting to new iOS versions and device models.
SEE ALSO
ideviceinfo(1), idevicesyslog(1), ideviceinstaller(1), ifuse(1), usbmuxd(8)