From 2d576fbc2eb35213e006990a18ecf6765eae78bd Mon Sep 17 00:00:00 2001 From: 555vedant Date: Wed, 2 Oct 2024 01:08:29 +0530 Subject: [PATCH] added gradel based commands --- docs/import_export/README.md | 37 ++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/docs/import_export/README.md b/docs/import_export/README.md index 484ac7375d..7bcc1fcfae 100644 --- a/docs/import_export/README.md +++ b/docs/import_export/README.md @@ -1,9 +1,11 @@ # Import/Export Documentation for uPortal 5 ## Overview + The Import/Export tool in uPortal 5 allows users to transfer configuration data and settings between instances, facilitating data migration and backup. ## Supported Operations + - **IMPORT**: Adds or updates entities from XML files in the portal database. - **LIST**: Lists supported data types and existing entities. - **EXPORT**: Creates XML files of specified entities and saves them to a location. @@ -12,57 +14,76 @@ The Import/Export tool in uPortal 5 allows users to transfer configuration data ## Importing Data ### Import Multiple Files + ```bash -ant data-import -Ddir={path-to-directory} [-Dpattern={ant-pattern}] +./gradlew importData -Ddir={path-to-directory} [-Dpattern={ant-pattern}] + ``` ### Import Single File + ```bash -ant data-import -Dfile={path-to-file} +./gradlew importData -Dfile={path-to-file} + ``` ### Import Single File (uPortal 4.3+) + ```bash -ant data-import -Dfiles={comma-separated-list-of-files} +./gradlew importData -Dfiles={comma-separated-list-of-files} + ``` ### Import List File (uPortal 4.3+) + ```bash -ant data-import -DfilesListFile={path-to-file} +./gradlew importData -DfilesListFile={path-to-file} + ``` ## Listing Data ### List Types + ```bash -ant data-list +./gradlew listData + ``` ### List Data of a Specific Type + ```bash -ant data-list -Dtype={entity-type} +./gradlew listData -Dtype={entity-type} + ``` ## Exporting Data + ```bash -ant data-export -Ddir={path-to-directory} -Dtype={entity-type} [-Dsysid={entity-identifier}] +./gradlew exportData -Ddir={path-to-directory} -Dtype={entity-type} [-Dsysid={entity-identifier}] + ``` ## Deleting Data + ```bash -ant data-delete -Dtype={entity-type} [-Dsysid={entity-identifier}] +./gradlew deleteData -Dtype={entity-type} [-Dsysid={entity-identifier}] + ``` ## Import/Export Logs + Logs for Import/Export operations can be found in the `UPORTAL_ROOT/target/data-import-reports` directory. Look for `data-import.txt` for summary reports. If errors occur, individual error report files will also be generated for each failed object. ## Troubleshooting + Refer to the logs for detailed error messages if operations fail. ## Additional Resources + - [uPortal 4.1 Importing and Exporting Data](https://apereo.atlassian.net/wiki/spaces/UPM41/pages/103942373/Importing+and+Exporting+data)