Introduction
We can initiate the Xray offline DB sync using the following REST API or JFrog CLI command if there is a desire to automate the DB sync process. This requires a user with admin permissions.
REST API
Usage:
POST /api/v1/updates/startOfflineSync
Sample Usage:
curl -u<USERNAME>:<PASSWORD> -XPOST "http://<JFROG_URL>/xray/api/v1/updates/startOfflineSync"
Sample Response:
{"info":"Local updates started"}
JFrog CLI
Please refer to this documentation for more information on downloading, installing, and configuring JFrog CLI.
Usage:
jf xr curl -XPOST /api/v1/updates/startOfflineSync
Sample Usage:
jf xr curl -XPOST /api/v1/updates/startOfflineSync --server-id <SERVER_ID>
Sample Response:
{"info":"Local updates started"}Notes:
Please make sure to place the update files in the respective directories in Xray server before triggering the offline DB sync process. We can get this data by navigating to Administration > Xray > Settings > Database Sync and selecting Offline for the instructions to get Offline Updates.