Up Previous Next Title Page Index Contents

3.1 Repository Administration

In this section we examine the system administration actions that operate at the level of whole repositories: creating a new repository, backing up and restoring repositories, and reconstructing damaged repositories.

3.1.1 Creating a New Repository

You may wish at some point to create a completely new, empty repository, containing no projects, metamodels or models. For instance, you may want to use none of the methods supplied with MetaEdit+, but rather only your own method, that you will define with the MetaEdit+ Method Workbench. (If you simply want to return to abandon any changes you have made in the original MetaEdit+ repository, simply suspend any server running on it and delete the repository directory and all its files. You can then reinstall the original MetaEdit+ repository).

To create a new repository, you should start a client, but do not log in yet. First determine which path you want to create the repository into: if the directory does not yet exist, it will be created, provided that its parent directory already exists.
In the multi-user version of MetaEdit+, creating a new repository begins in the server: see Section 2.7. After that basic creation operation, you can proceed by pressing Login in the Startup Launcher, and choosing the repository you created in the server, marked New database in the dialog list of repositories. A dialog will open and you can continue from step 3) below.

1)Press the small ‘down arrow’ button to show the full Startup Launcher, then press Create DB. You will be asked whether you want to create a new repository: answer yes.
2)A dialog will open (Figure 5) prompting for the basic information of the new repository, with fields for the repository name and path, and for the system administrator user name and password. Fill in each field, moving to the next with the tab key or mouse. The name of the repository is that which will be shown to the user: there are no restrictions on the format of the name. The path should in general be a relative path, and you should make sure that the path you enter is legal in all client platforms that will access the repository.

Figure 5. Creating new database.

3)Fill in the fields for the system administrator name and password. In general, the name for the system administrator is sysadmin, rather than any particular user’s name.
4)When you have filled in all the fields, press Enter, and you will be prompted to enter the password again for confirmation.
5)The new repository will now be created and added to the Database Roots file, artbase.roo. You are now logged in to the repository as the system administrator, and the basic information you have entered is committed.
6)Login proceeds as normal, opening a Main Launcher and Repository Transcript, and asking for which projects to open and choose as default project. As no projects exist yet, just press Cancel in those dialogs.

The repository is now created. However, it is normal to continue and define at least one extra user and one project, and set metamodelling options, before logging out. You should be careful working with MetaEdit+ in a repository with no projects open, especially if no projects exist. In particular, you should avoid trying to open editors on models or metamodels. It is thus safest to create a project now.
1)In the Main Launcher, choose Repository | Options and select Admin Launcher (see Section 3.2.5) from the Repository page. Here you can create some users (see Section 3.3.2): you may also want to create user groups to make specifying project access rights and concurrency modes easier.
2)Still in the Repository page, press Metamodellers (see Section 3.2.2) and choose those users who will have permission to metamodel.
3)Set the metamodelling security level from the pull-down list (see Section 3.2.3).
4)Now would be a good time to create some projects: at least one should in general be created. In the Main Launcher, press Graphs to open a Graphs Browser. In the projects list on the left, choose Create new... from the popup menu. Give a name for the new project: the path name for that project’s physical area will be constructed as a legal path name in the current client from the name given: you may need to change that path name later if you have clients running on different platforms (see Section 3.3.3 and 3.3.4).
5)Your transaction will be committed, and the project will now be visible in the list of open projects. Select the new project as Default project from the pull-down list.

After performing the above operations you can commit and log out, or continue by making metamodels: until metamodels are made, it is of course not possible to create any models.

3.1.2 Backups

It is a good idea to take backup copies of your database at regular intervals. Make sure no users are logged in when you take the backup, even in a long transaction. Similarly, in the multi-user version, the server should not be running when the backup is taken.

Backups can be taken either manually via your operating system (which will normally be faster), or using the Backup button in the MetaEdit+ Startup Launcher. If you make the backups manually, you should include all files in the database directory (manager.ab and trid), plus all directories there (areas, users, backup, and in the multi-user version only, comm), their subdirectories and files. If you wish, you can omit the files in the backup directory and subdirectories: in any case make sure that any empty directories are included.

Backups with the Backup button simply take a copy of all the files in the database directory and its subdirectory. For this reason you should be careful not to use root directories — or any other directory that contains files — as database directories, or as the directory into which the backup copy is made. The Backup command also adds an entry into artbase.roo for the backed-up copy of the database: it prompts for a name for the backup.

3.1.3 Reconstructor

Most problem conditions that can arise are handled automatically by MetaEdit+ and ArtBase. For example, if a user uses emergency exit, his user details in the repository are left in an inconsistent state; however, the next time he logs in, his user is automatically reconstructed.

Hardware or software failures can however cause the database to end up in an inconsistent state. The ArtBase Reconstructor, available from the Reconstruct button in the Startup Launcher, can help in these situations. To apply Reconstructor you must first select a repository and open it with the user name and password. All users can reconstruct their own user account as described in the MetaEdit+ User’s Guide, but other reconstruction operations require system administrator rights.

The Reconstructor shows a list of all users and a list of all areas. The check-box buttons allow you to select the actions to apply to the selected users or areas. First choose an action, then select the items to apply that action to, and finally press the Apply button.

Figure 6. Repository reconstruction.

User reconstruction will rebuild the user information for the selected users, so that they can log in again.

Cleanup areas will delete any temporary files that may have been left in the selected areas’ directories.

Unlock all objects will remove all locks from all objects in the selected areas, useful if a user has crashed in the database, and his locks have not been released.

Reset object info will delete any dynamic files (*.cif) that may have been left in the selected areas’ directories.

Full database recovery will delete the current database files, replacing them with those from the automatically created backup directory. As this destroys data, you should take a backup of the whole database first. Note that full database recovery is different from restoring the whole database from a backup copy that you have created: full database recovery copies files from the database’s own backup directory, i.e. the state before the last commit, whereas restoring from your own backup replaces both the current files and the backup files from your copy of the whole repository, at the state when you made that backup.

Up Previous Next Title Page Index Contents