Import repository metadata to the OL Hub
The ol import repository command enables you to upload in a single file an entire repository to the OL Hub.
The uploaded file is of type ORZ (OpenLegacy Repository Zip). ORZ files are created by exporting an existing repository from an OL Hub account.
The ol import repository command matches the ID of the projects, modules, and assets of the imported repository with the contents of the target repository. While imported non-matched entities are added to the target repository, imported matched entities are compared to their counterparts, and if they are found to differ, they override them.
Rules and Prerequisites
- Login to the OL Hub.
- An uploaded entity with the same name as its counterpart but with a different ID will not be imported.
Syntax
ol import repository REPOSITORY_NAME [OPTIONS]
Arguments
REPOSITORY_NAME
The path of the uploaded ORZ file. By default, the OL CLI will upload the file from the current folder. An error message is issued if the specified path does not exist.
Options
--connection, -c
Include module connection properties in the imported repository (default: false).
Example
Importing a repository to the OL Hub
temp> ol import repository ./path/to/repository.zip --connection
temp$ ol import repository ./path/to/repository.zip --connection