You can export data from Oracle Linux Automation Manager using the command-line interface.
This task is commonly done to backup your Oracle Linux Automation Manager server. This use case requires that you have installed the command-line interface and have configured an Oauth2 token for your account.
To export data to a json file from Oracle Linux Automation Manager, do the following:
- Generate the list of resources you want to export.
awx --conf.host https://192.102.118.107 --conf.token h7a3NPiam8Or4px7Kkoe87cWcTeixz --help
Specify the following options on the command-line interface:
-
--conf.host
option to include the HTTPS address of your Oracle Linux Automation Server IP address or hostname.
-
--conf.token
option to include the Oauth2 token.
-
--help
option to generate help information.
- Do a partial export of a resource. For example, you can export all users information by entering the following command.
awx --conf.host https://192.102.118.107 --conf.token h7a3NPiam8Or4px7Kkoe87cWcTeixz export --users > users.json
The export command followed by the --users resource type generates an export of all user to the users.json file.
- Do a full export of all resources on your system. For example, enter the following command:
awx --conf.host https://192.102.118.107 --conf.token h7a3NPiam8Or4px7Kkoe87cWcTeixz export > all_resources.json
When the export command is used without any resources specified exports all resources to the all_resources.json file.