JetBackup5 provides a comprehensive API for managing backups, allowing users to list, restore, and manage backup data efficiently. Here’s an overview of key API functions related to backups:
1. Listing Backups
- listBackups: This function lists all backups based on specified parameters.
Example Call JETAPI:
jetbackup5api -F listBackups -D “type=1&contains=511&account_id={$ACCOUNT_ID}”
jetbackup5api -F listBackups -D “type=2&contains=3&account_id={$BACKUP_JOB_ID}”
2. List Backup For Type
- listBackupForType: This function in JetBackup 5.3’s API allows you to retrieve the most recent backup for a specific account, filtered by backup type and content.
Example Call JETAPI:
jetbackup5api -F listBackupForType -D “type=1&contains=511&account_id={$ACCOUNT_ID}”
3. Listing Backups for a Specific Account
- listBackupForTypeName: Lists all backups for an account matching the given backup type and contains parameters.
Example Call JETAPI:
jetbackup5api -F listBackupForTypeName -D “type=1&contains=511&account_id={$ACCOUNT_ID}&name={$USERNAME}”
4. List Accounts By Filters
- listAccountsByFilters: This function lists a single backup for accounts that match the specified filters. This enables administrators to efficiently locate and manage backups for accounts that meet certain conditions.
Example Call JETAPI:
jetbackup5api -F listAccountsByFilters -D “filters[account_status]=2&filters[account_suspended]=0&filters[locked]=0&filters[backup_structure]=0&filters[show_oldest]=0”
5. Get Backup Items
- getBackupItems: This function in JetBackup 5.3’s API allows you to list all backup items generated for a specific account backup. This is particularly useful for administrators who need to view detailed components of an account’s backup, such as individual files, databases, or configurations.
Example Call JETAPI:
jetbackup5api -F getBackupItems -D “_id={$PARENT_ID}”
6. Get Backup Item
- getBackupItem: This function in JetBackup 5.3’s API allows you to retrieve detailed information about a specific backup item. This is particularly useful for administrators who need to inspect or manage individual components within a backup.
Example Call JETAPI:
jetbackup5api -F getBackupItem -D “_id={$BACKUP_ITEM_ID}”
7. Manage Backup Lock
- manageBackupLock: This function in JetBackup 5.3’s API allows administrators to modify the lock status of backups. Locking a backup ensures its retention, preventing it from being automatically pruned or deleted during routine cleanup processes. This is particularly useful for preserving critical backups that must remain available for extended periods.
Example Call JETAPI:
jetbackup5api -F manageBackupLock -D “_id={$PARENT_ID}&locked=1&lock_ttl=10”
Restoring Backups
- addQueueItems: Queues backup items for restoration.
Example Call:
jetbackup5api -F addQueueItems -D “type=2&snapshot_id=[$SNAPSHOT_ID]&items[]={$BACKUP_ITEM_OBJECT_ID}&options[owner]=reseller&files[$BACKUP_ITEM_OBJECT_ID][/public_html]=Directory”
- This command queues the specified backup items for restoration with the provided options.
To learn more about jetapi, use the following command:
jetbackup5api –help
Still having trouble or need some help? Don’t hesitate to reach out – we’re here to assist you every step of the way!!!

