Checkin Client is a tool that you can use to replicate the resources tree in the Governance Registry into your file-system or to a dump file. Much like a version control system like Subversion, you can do checkout, checkin and update operations using this tool.
When you are checking out, you can specify which path of the collection tree should checkout and where in the local file-system checkout to. And you can give more options to make it more flexible as described in the following sections.
The tool basically functions in two modes.
In this mode the collections in the registry are mapped to directories/folders and non-collections are mapped to files. Once you checkout the registry to the file system, you can edit existing files, delete existing files or directories and add new files and directories and then you can checkin them back to the registry. This will enable you to navigate and work with more familiar file system. Specially when you have to import lot of files to a collection, it will be easy to checkout that collection to a local directory, copy the required files to that directory and commit it back.
In this mode the resource tree (from a path specified) will be dumped to a single file. You are not supposed to edit this files to do any changes. Rather you can use this mode to get backups\restore and possibly move a resource tree from one registry to another as an alternative to doing a remote mounting and moving.
Checkin Client should be used with either checkin, checkout or update commands. Here is a description about each of these commands.
| The Command | A description about the command |
| co or checkout |
You can use this command to check out a registry path to the local file system or to a single dump file. If you are checking out local registry just provide the path. Examples:
|
| ci or checkin | You can use this command to check-in (commit) an already committed local file system or a dump file back to the registry. If you are committing a dump file, then you should provide a path or path prefixed by registry url just after the checkin command. If you are committing a file system you can provide a url of a registry followed by the command to commit it back to a perticular location, or you don't need to provide any url if you want to checkin it to the same location where you got the checkout. |
| up or update | You can use this command to update an already committed local file system. This command is not available if you have checked out to a dump file, as it can be updated using the checkout command itself. |
| Options | Overview |
| -u <username> | The username of the login to the registry. This is a required option as you can't login anonymously from checking client |
| -p <password> | The password of the login to the registry. |
| -d <directory> | The working directory. The commands will be executed as you are currently in the directory specified by this option. If you are not giving any options, the working directory will be same as the directory that the command is executed. |
| -f <filename> | Filename to dump (if you are checking out) or restore from (if you are checking in). |
| -h | Displays the help screen. |
You have to first run ant before running checkin client. Otherwise it will display you a warning to do so. If you have not installed ant, you can download it from http://ant.apache.org/bindownload.cgi. Then run the checkin-client.sh in linux or checking-client.bat in windows to run the checkin client.
Here are some examples of using checkin client. Note that here I'm running the checkin-client.bat in windows. If you have are in linux, you have to use checkin-client.sh instead. For the username and the password, I'm using "admin" "admin". Please replace them with your username and password when you are trying these commands.
| Sample Scenario | Command to run |
| Checking out a root collection from a remote registry running on https://localhost:9762 to the current working directory. | checkin-client.bat co https://localhost:9443/registry/ -u admin -p admin_pw |
| Checking out a root collection from the local registry to the current working directory. (You should set the CARBON_HOME environment variable to the registry you are referring) | checkin-client.bat co / -u admin -p admin_pw |
| Checking in a collection from the current working directory back to the registry which it check out (This command is independent of whether it is checked out from a local registry or a remote registry. It will anyway commit it back to where it is checked out from). | checkin-client.bat ci / -u admin -p admin_pw |
| Update an already checkout location | checkin-client.bat co / -u admin -p admin_pw |
| Dump a remote registry root to a file (Note that additional -f option) | checkin-client.bat co https://localhost:9443/registry/ -u admin -p admin_pw -f remote.dump |
| Restore a dump file to a remote registry root. Note that here you have to provide the url with the "ci" command. | checkin-client.bat ci https://localhost:9443/registry/ -u admin -p admin_pw -f remote.dump |
| Dump the local registry root to a file. | checkin-client.bat co / -u admin -p admin_pw -f local.dump |
| Restore a dump file to a local registry root. | checkin-client.bat ci / -u admin -p admin_pw -f local.dump |
| Copy entire tree from /path1 to /path2 using checkin client. (This can be done through 'copy' command too) |
checkin-client.bat co /path1 -u admin -p admin_pw -f temp.dump
checkin-client.bat ci /path2 -u admin -p admin_pw -f temp.dump
|
| Copy entire tree from G-Reg1 (runs on 9443 port) to G-Reg2 (runs on 9444 port) using checkin client. |
checkin-client.bat co https://localhost:9443/registry/ -u admin -p admin_pw -f temp.dump
checkin-client.bat ci /localhost:9444/registry/ -u admin -p admin_pw -f temp.dump
|