Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import/Export in the uP5 Manual(#1241) #2859

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions docs/import_export/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Import/Export Documentation for uPortal 5
555vedant marked this conversation as resolved.
Show resolved Hide resolved

## Overview

The Import/Export tool in uPortal 5 allows users to transfer configuration data and settings between instances, facilitating data migration and backup.

## Data tasks

- **dataImport**: Adds to or updates the portal database for the entities defined in the specified XML file(s). Requires -Dfile={path-to-file} or -Ddir={path-to-directory}
555vedant marked this conversation as resolved.
Show resolved Hide resolved

- **dataList**: With no arguments (-Dtype={entity-type}) lists all supported portal data types and the operations (export, delete) supported for each.
555vedant marked this conversation as resolved.
Show resolved Hide resolved

- **dataExport**: Creates XML files representing the requested entities and writes them to the specified file system location. Parameters: -Ddir={path-to-directory} -Dtype={entity-type} [-Dsysid={entity-identifier}]
555vedant marked this conversation as resolved.
Show resolved Hide resolved

- **dataDelete**: Deletes the specified entity. Requires -Dtype={entity-type} and -Dsysid={id}
555vedant marked this conversation as resolved.
Show resolved Hide resolved

- **dataInit**: Drop and recreate uPortal tables and reimport data


## Running Tasks via Gradle
To run the Import/Export tool via Gradle, navigate to the uPortal project directory and execute
555vedant marked this conversation as resolved.
Show resolved Hide resolved

```bash
./gradlew :overlays:uPortal:<task-name> -D<options>

```

## Importing Data

### Import Multiple Files

```bash
555vedant marked this conversation as resolved.
Show resolved Hide resolved
./gradlew :overlays:uPortal:dataImport -Ddir={path-to-directory} [-Dpattern={ant-pattern}]

```

### Import Single File

```bash
555vedant marked this conversation as resolved.
Show resolved Hide resolved
./gradlew :overlays:uPortal:dataImport -Dfile={path-to-file}

```

### Import Single File (uPortal 4.3+)

```bash
555vedant marked this conversation as resolved.
Show resolved Hide resolved
./gradlew :overlays:uPortal:dataImport -Dfiles={comma-separated-list-of-files}

```

### Import List File (uPortal 4.3+)

```bash
./gradlew :overlays:uPortal:dataImport -DfilesListFile={path-to-file}

```

## Listing Data

### List Types

```bash
./gradlew :overlays:uPortal:dataList

```

### List Data of a Specific Type

```bash
./gradlew :overlays:uPortal:dataList -Dtype={entity-type}

```


## Exporting Data

```bash
./gradlew :overlays:uPortal:dataExport -Ddir={path-to-directory} -Dtype={entity-type} [-Dsysid={entity-identifier}]

```


## Deleting Data

```bash
./gradlew :overlays:uPortal:dataDelete -Dtype={entity-type} [-Dsysid={entity-identifier}]

```

## Reinitializing Data (Drop & Recreate Tables)

```bash
./gradlew :overlays:uPortal:dataInit

```

## 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.
555vedant marked this conversation as resolved.
Show resolved Hide resolved

## 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)


555vedant marked this conversation as resolved.
Show resolved Hide resolved