Backups – Keep Your Data Safe!

Backups are an essential part of implementing any tool, and particularly Cradle. There are two types of backups that you should consider, each with its own strengths.

What Needs to Be Backed-Up?

A Cradle system can contain many databases. Each database is stored in a single directory. Naturally, you will want to backup all, or at least most, of these database directories.

The project register held in the files proj_reg.* in the root of your Cradle installation:

  • Linux: $CRADLEHOME
  • Windows: %CRADLEHOME%

reference all of your databases. If you lose these files, or if they are damaged, you will not be able to login to any of your databases. If this ever happens, contact 3SL as we can rebuild these files for you!).

All information related to a database is stored in that database’s directory. But there is some information that is specific to each Windows/Linux user. This information includes the users’ preferences, and any Personal scope definitions (queries, views, forms and so on) that they may have created.

The users’ personal information is stored in:

  • Linux: $CRADLEHOME/admin/definitions/personal
  • Windows: %CRADLEHOME%\admin\definitions\personal

You should consider backing these up.

Finally, you may have changed some of the configuration files to configure Cradle for your IT environment. For example:

  • Cradle startup file, cradle.ini, or .cradlerc on Linux
  • CDS and CWS configuration files in the ‘admin’ directory in the Cradle installation on the server: cds_hosts, cds_users, cws_config
  • External Command Interface configuration file, eci_config
  • LDAP and tracing configuration and options files, help in directories called ldap and trace

You may decide that it is easiest to simply backup the entire admin directory and the Cradle startup file in the executables directory.

You should backup all of these files. If you ever need to re-install all of Cradle, then it is easy to use the backup of these files to restore all your configuration work.

Types of Database Backup

There are two types of database backup:

  • Image backups, that simply backup the database’s directory, containing all of the database tables and definition files
  • Export backups, that perform a full Cradle export on the database, exporting every piece of information into Cradle format. All Cradle versions are guaranteed to be backwards-compatible such that any version of Cradle can import an export file produced by the current version of Cradle, and also any earlier version of Cradle.

We recommend that you run both types of backup.

Image Backups

Image backups are a backup of all of the files and directories in a database.

It is easy to backup your databases if all of the databases have a common root directory. For example, you could store your databases in directories such as:

  • /Databases/Active/Test
  • /Databases/Active/Production
  • /Databases/Active/New-Product

In this case, you could also backup /Databases/Active to backup all of the databases at the same time.

You will already backup information on your servers. So it should be easy to add the Cradle database directories to your existing backup system.

If you want to backup databases directly, then we recommend using tar and gzip on Linux (they are also available for Windows) or either WinZIP or 7-zip on Windows. On Linux, you would use commands such as:

cd /Databases/Active
tar cf test.tar ./Test
gzip test.tar

You may find your system can combine these utilities into one command.

Characteristics

The advantage of an image backup is that it is quick.

The disadvantages of an image backup are that it is impossible to restore an individual item or cross reference from the backup. An image backup contains entire database tables. So the smallest thing that you can recover from an image backup is an individual database table, not an item of information (which is a rows in one or several tables).

Export Backups

Cradle includes a utility called c_io that can perform exports and imports of any, some or all of the data in a database.

For example, the following c_io command will export all of the data in the demonstration database DEMO that is part of all Cradle systems:

c_io -login MANAGER,MANAGER,DEMO -export /tmp/export.exp -type all

You can perform incremental exports using options:

  • -from yyyymmdd
  • -to yyyymmdd

You can also use the -log option to produce a log file that summarises everything that has been written into the export file.

Characteristics

The disadvantage of an export backup is that it is slow.

The advantage of an export backup is that you can restore any single item or cross reference or definition file from the export.

Resilience and Data Integrity

Of course, you should ensure that your backups are stored on a different server to the server that runs Cradle. Ideally, you should have off-site backups as well.

For those of you who trust your data to third parties, you can store it on a remote server… there are many so-called ‘cloud’ services available.

If you decide to use a third party, please check their terms and conditions. For example, DropBox claims intellectual property rights over everything that you deposit with them. This is not a good idea for your company’s private data!

Backup Frequency

We recommend that you run:

  • Image backups twice each day. Take the first backup at lunchtime, to capture the work that everyone has done in the morning. Take the second backup in the evening, to capture the work that everyone has done in the afternoon.
  • Export backups once each day. You can run the export backup in the evening when no-one will be working.
  • Image backups of the administration files every day, or every week. They are small and the backup will run very quickly.

Defining a Heading Tag in Document Publisher

In Document Publisher you can define headings in several ways; this post will show how to define the Heading tag.

Before starting, Word’s Multilevel List needs to be set; use the list which has Numbering and Heading set:

Multilevel List options
Word Multilevel List options

This will give the user a Heading style which numbers the names of the items output.

Add a ParagraphGroup tag and create your Hierarchy table and set the Key or Identity in the Item Selection.

Default Settings for the Heading Tag

Placing cursor at the end of the word ParagraphGroup in the tag but before the bookmark, click on the arrow for the Field tag button and select the All item types option and then down to Heading tag option at the bottom.

Heading field tag
Selecting the Heading field tag

The Field Details UI will look like this when it opens:

Field Details User Interface
Field Details User Interface with the default settings

This is where the user sets the Heading tag options for each row, starting with the top row. Leaving all the options as set for each row will give the user the following output:

1  Stakeholder Requirements
1.1  Customer Requirements
1.1.1  Capacity
1.1.1.1  Flight Crew
1.1.1.1.1  Corrective Maintenance (Air)
1.1.1.1.1.1  Fault Monitoring System
1.1.1.1.1.2  Pilot
1.1.1.1.1.3  Co-pilot

Basing the Heading Level on the Item Attribute Key

The user may require that the sections start with a different number for example they may wish to use the key instead for the Heading tag.

The Word’s Multilevel List is not needed to be set for this option as the numbering is set by the Key.

Setting the Include level to No and Count Separators to Add and the Attribute to Key, the type of Separator will now not use the Hierarchy Level in the output but base the numbering on each items Key.

The user can set each of the other rows to the same settings as the top row by select the row, clicking the Remove Field button Remove Field Button and then the Copy Field button Copy Field.

The Field Details UI
The Field Details using the Key not the Hierarchy Level

This will give the user the following type of output; remember the Key starts at 0 but the Heading numbering in the Heading Styles starts at 1:

1  Stakeholder Requirements
2  Customer Requirements
2.1  Capacity
2.1.1   Flight Crew
2.1.2  Corrective Maintenance (Air)
2.1.3  Fault Monitoring System

Using the Separator Option

This option allows the user to change to which separator is used within Key or attribute the user has decided to use

Using the include Fixed Number Option

The user can use an Include Fixed Number of separators and Add or Subtract the number of separators for a different output. If the user sets it to Add and the Fixed Number to 2, it will add 2 separators to the key and the output will look like this:

1.1.1  Stakeholder Requirements
1.1.2  Customer Requirements
1.1.2.1  Capacity
1.1.2.1.1   Flight Crew
1.1.2.1.2  Corrective Maintenance (Air)
1.1.2.1.3  Fault Monitoring System

If the user set it to Subtract and the Fixed Number to 1 the output will look like this:

1  Stakeholder Requirements
2  Customer Requirements
3  Capacity
3.1  Flight Crew
3.2  Corrective Maintenance (Air)
3.2.1  Fault Monitoring System

Note: Don’t use subtract on rows where the key is only a single digit as the numbering will not be output, showing up like this:

Stakeholder Requirements
Customer Requirements
Capacity
1    Flight Crew
2    Corrective Maintenance (Air)
3    Fault Monitoring System

Using the Hierarchical Level with an attribute

The user can use the Hierarchical Level with the Key which will add the key to the level in the hierarchy and the output will show like this:

1.1  Stakeholder Requirements
1.1.1  Customer Requirements
1.1.1.1.1  Capacity
1.1.1.1.1.1.1   Flight Crew
1.1.1.1.1.1.1.1  Corrective Maintenance (Air)
1.1.1.1.1.1.1.1.1  Fault Monitoring System

The other attributes the user can use to the set the level with or without the Hierarchical level are Identity, Group and a Category. When Category is selected a new option shows to let the user pick the category they wish to use.

Using the Heading Title Option

The Heading Title option allows the user to use different sources to name the item being output. The option include:

  • <None>
  • Static text
  • Identity
  • Key
  • Group
  • Name
  • Comment
  • Description
  • Category
  • Frame

The Category and Frame options allow the user to select from a new option which category or frame they would like to use.

Using the Strip Prefix

This option allows the user to remove any specified text from the attribute during output. For example, the items Key may be REQ-1.1 and the user only requires the 1.1. The user would enter REQ- in the Strip Prefix option to have it removed.

Using the Character Format Option

This option allows the heading style to be overridden but not the numbering. If the user decides that the second and fourth levels should look like the style Subtitle, it will have the font, size and colour of Subtitle but still the numbering set to Heading 2.

Field Details Character Format Option
Field Details Character Format Option using the Subtitle style

Using this option the output would look as below:

Character Formatting using Subtitle
Shows the second and fourth rows with the Subtitle style

This style will also be reflected in the Table of Contents:

Character Formatting in the TOC
Character Formatting in the Table of Content

Split Items in WorkBench

Creating Multiple Items From One Original

As a project progresses a requirement can grow from being atomic to containing multiple phrases and components. From an implementation or verification point of view this makes work increasingly difficult.  It is necessary to split items like this into smaller parts. Making them into hierarchical items ensures clear and concise elements. However, it would be laborious to cut and paste the individual elements into new items and create the links back to the parent.

The Split utility is an operation available for requirements, system notes and specifications. It splits an item’s text frame into several parts and creates a new item in the database for each of these parts according to a user-selected regular expression as one of:

  • Newline
  • 1) / 2} / 3.
  • 1.2 / 2-3
  • a) / b}
  • i) / iv} / ix.
Screenshot showing the item split dialog
Item split dialog

Each of the new split items is a copy of the original item and they are cross referenced back to the original item with a specific link type. The frame content of the original item is unaffected by the split. If change history is enabled for the item type an entry is placed in the change history log.
Note: The CREATE_ITEM privilege is required to use the split option.
The Frame Setup dialog in Project Setup allows you to set the destination item type, destination frame and the link type to be used when linking the split items back to the original item.

The reason you would split an item instead of copying the item, is the split items text frames can be broken down into multiple items.

If you re-split an item using a different link type new items are created.

If you re-split an item using the same link type which would result in fewer items, all existing items are updated and any additional items are deleted.

Lastly if you re-split an item using the same link type which would result in more items, all existing items are updated and any new items are added.

Article Updated 04/02/2019 – Updated information