Hello,
Thank you for your interest in using our JETAPI to automate your download process. I would like to provide more information about our JETAPI Calls and our JetBackup 5 Hooks that could be used to achieve your request.
1. Generating the JetBackup Download
JetBackup 5 uses the Queue to process all JetBackup jobs (backups, restores, reindex, and downloads). In order to Queue a Download of the most recent backup you would need to use the following command:
Code: Select all
jetbackup5api -F addQueueItems -D 'type=4&snapshot_id={Backup_Parent_ID}'
Please note that the `snapshot_id` is the parent id of the entire backup and can be found for a specific account by using the following JETAPI command:
Code: Select all
jetbackup5api -F listBackupForAccounts-D 'type=1&contains=511&filter={acctname}'
When it returns you will be able to spot the snapshot_id/parent_id of the most recent Full Account Backup for the specified account. The return would like like the following:
Code: Select all
data:
accounts:
0:
account_id: 612f868d45ce517f430759b4
account: acct0001
backup:
_id: 614283688be0b2184c2e6b02
parent_id: 61424b257f9a7106a1423813
account_id: 612f868d45ce517f430759b4
....
2. Using JetBackup 5 Hook
JetBackup 5 has a custom Hook feature that allows you to run custom scripts before/after key events. In this case, a Post Download Hook would allow you to run a call back when the download is complete. You can find more information on JetBackup 5 Hooks and how to configure one here:
JetBackup 5 Hooks Documentation
The JETAPI Call listDownloads is then one example of fetching the recent downloaded backup. An example would be the following:
Code: Select all
jetbackup5api -F listDownloads -D 'sort[created]=-1&limit=1'
This command will return the single most recent download data which includes the full path to the download.
I hope you find all of this information helpful.