Exporting a Database Collection
To export a mongo database collection:
- Login to Kubernetes dashboard UI with the token.
- From the top section, select the avx namespace.
- Click pods and search for mongo-routerdb-0.
- Click on the three dots icon and select Exec.
-
To navigate to the logs directory, execute the following command:
cd /appviewx/dependencies/logs -
Check if export_collection directory is available. Otherwise, to
create the directory, execute the following command:
mkdir export_collection -
To navigate to the export_collection directory, execute the following
command:
cd /appviewx/dependencies/logs/export_collection -
To export the database collection, execute the following command:
Change the fields highlighted in bold with the desired values according to your
setup.
This command will export the collection and the file will be available at the following location: /appviewx/dependencies/logs/export_collectionmongoexport --username admin --password <password> --db=appviewx --collection=<collectionName> --out=<fileName>.json --authenticationDatabase adminNote: The exported file is also available at the following location on the host where the mongodb pod is running: INSTALLATION_PATH/appviewx/logs/export_collection
