rokpoto.com
rokpoto.com

Reputation: 10746

How to import system backup to Artifactory using JFrog cli

I've run Artifactory using Docker.

Downloaded JFrog cli inside the container and configured it.

So ./jfrog rt ping returns

OK

Is there a way to perform system level export/import using JFrog cli?

Succeeded to perform it using web ui. Couldn't find information on how to perform system level export/import in the documentation.

Edit

Succeeded to perform export using REST API:

curl -u admin:pass -X POST -H "Content-Type: application/json" --data @/tmp/export-settings.json http://localhost:8081/artifactory/api/export/system

Upvotes: 0

Views: 1189

Answers (2)

Eyal Ben Moshe
Eyal Ben Moshe

Reputation: 2425

You can invoke the same REST API using JFrog CLI's curl command as shown below. This way, you don't need to provide the URL and credentials. JFrog CLI's config storage will be used. You can manage this storage using the jfrog rt c command. If you have multiple Artifactory severs configured, and you don't want to use the default server, the jfrog rt curl command also accepts the --server-id option, with the pre configured Artifactory server ID as the valve.

jfrog rt curl -X POST -H "Content-Type: application/json" --data @/tmp/export-settings.json api/export/system

Upvotes: 3

yahavi
yahavi

Reputation: 6043

This feature is currently not supported by the CLI.

Feel free to create a feature request.

Upvotes: 1

Related Questions