wirm-logo2.gif (1722 bytes)

[Home Page]   [Overview]    [ Manual]    [Tutorial]

Repository Management

Gvien an installed version of WIRM, this section of the manual describes how to setup and manage individual repositories.
The following operations are possible:
  1. Download or checkout an existing repository
  2. Create and initialize a new repository, or initialize an existing one
  3. Backup and restore repository data
  4. Set and test a repository

Download or checkout an existing repository

Repositories are installed under the repos directory of the wirm installation, one subdirectory per repository, where the name of the subdirectory is the name of the repo.

Therefore, when downloading an existing repository, place the tar file in the directory repos, the extract the repository using the command

 tar xf tarfile
This should create a subdirectory whose name is the name of the repository.

If you are checking a repository out from the SIG CVS tree, do

 cvs checkout -d repo_name src/wirm/repos/repo_name 

Create or install repositories

First, ask your database administrator to grant database read & write privileges to the user wirm, identified by the admin password that you assigned in the config.pl script.  For MySQL, this can be done as follows:

prompt%  mysql mysql

mysql>  grant all privileges on *.* to wirm@localhost identified by 'secret';

Ask your database administrator to run the script wrm/lib/conf/db-init.pl, with one argument, the name of the new or installed repository. This will drop a relational database called repo_name if it exists, and create a new one. Note: this may require special administrative privileges (such as root).

Note: if you needed to become root to create the database, be sure to exit the root account before continuing with the initialization.

Initialize the Repository. Note, this will work both for creating a new repository and for initializing and installing an existing one.
cd wrm/lib/conf
repo-init.pl repo_name
The repo-init script will automatically perform the following tasks:

Backup and restore repository data

Backup and restore scripts are in the directory wrm/lib/backup.

From within that directory all data in a repository may be backed up by the command

repo-backup.pl repo_name backuppath
All data may be restored (replacing existing data), by the command
repo-restore.pl repo_name backuppath
These two commands may be used to copy data between two instances of the same reppsitory. For example, if bmap exists both on a production server and on a personal development server, the production database can first be backed up to a personal directory, then restored to the personal copy of the repository.

Set and test a repository

Once you have installed at least one repository you can access wirm in several ways, where cgi-bin is the URL of the cgi-bin directory as set in conf.pl (e.g., http://yourserver/cgi-bin):
  1. cgi-bin/wrm/console.pl, which will ask for the repository to be set.
  2. cgi-bin/wrm/console.pl?cx_repo=repo_name, which will not require setting the repository
  3. cgi-bin/repos/repo_name/main-menu.pl, which will take you directly to the main menu for the repository.
When asked to set a repository a popup menu will list the available installed repositories. Click on one to set the repository. The name of the selected repository will be passed to each new cgi invocation until you set the repository again.

Once you have set the repository, you can access many of the links from console.pl to be sure your installation was correct. A good one is "View Schema", for looking at the underlying schema of a given repository.

Your repository is now ready for schema and view definition. See the Tutorial for more information. Once installation is complete a given repository can be accessed in several ways:

For further help installing WIRM, please email info@wirm.org