Exporting and Importing Repositories

The ol export repository and ol import repository commands provide you with a powerful tool to manage your OL-Hub environments. For example, when you want to duplicate the production hub to a new development environment to serve as a baseline for new projects and services. You can also use the commands to back up and restore repositories.  

Export repository

The exported repository can contain all projects and modules in your OL Hub account. However, you can choose to export only specific projects rather than the whole repository and include connection profiles. 

The ol export repository command generates an ORZ (OpenLegacy Repository Zip) file containing the specified contents and downloads it to your local station.

temp> ol export project project-mf-cics-cobol --license --connection
temp$ ol export project project-mf-cics-cobol --license --connection

Import repository

The ol import repository command enables you to upload an OpenLegacy repository zipped archive file and update and override a destination repository.

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, assets, and contracts of the imported repository with their counterparts on the destination repository. At each entity level, corresponding entities with matching IDs are compared. If they are different, the imported entities will override their corresponding entities. Imported entities with unmatching IDs are added to the destination repository.

temp> ol import repository ./path/to/repository.zip --connection
temp$ ol import repository ./path/to/repository.zip --connection