Delta Watch: Database management

0 0

Introduction

When working with Delta Watch (DW), everything is stored in your database (DB). This is convenient as backups are easily made or restored. But as with any DB, when you are actively using it to test new setups, create small short projects, or the like, the size of the DB might grow quickly. This document covers some methods of managing your DB. These include making and creating manual backups as well as size reduction options.

DB management utility

Delta Watch comes with a utility that needs to be used when performing special operations on the DB, such as creating a manual backup or restoring one. This program is called Tunis.Utils.exe and is located in your DW program folder. On a default installation, this would be:

    [drive]:\Topcon Delta Watch\Tunis.Utils.exe

When you run the program, it will ask you for a login. Use the following details:

    User: Administrator
    Password: Maflec49

Once you have entered these details, you get a tiny dialog box which gives access to the various DB management tools. The functions that we will use for actions described in this article are Create backup and Restore backup.
By default, if configured, DW makes automated backups of the DB in the program installation folder. On a default installation, this would be:

    [drive]:\Topcon Delta Watch\Backup

The DB could have an extension of either .bak or .bku, and the filename could look something like one of the following examples, depending on how the backup was created:

  •     tunisdb_20171205183059.bku
  •     tunisdb_firebird_20171205181529.bku
  •     tunisdb_manual_201712051801013.bku

Configure Delta Watch for automated backups

The most important thing to do is to configure DW to make automatic backups. Once configured, they will be created at regular intervals.

In Delta Watch, navigate to Administration > System configuration > Automatic backup.
Here you can configure the settings. Please note the time interval is in minutes, and 1,440 minutes = 1 day. If you want to make two backups of the DB—for example, one local backup and one on an offsite location—then check the option Additional copy. Refer to the screenshot for an example configuration.

Once configured, click the Apply button in the toolbar, and if you want, you can now also create a manual backup. To do so, click the Help tab in the menu bar and then select Database backup...

Depending on the size of the DB, this could take a while. For more options, refer to the section Manually creating a DB backup.

Please also refer to the section Space requirements.

Restoring a backup

Restoring a DB backup might be required for various reasons such as:

  • Accidental loss of data, user deleted wrong data
  • Computer operating system issues, requiring a reinstallation of complete system
  • DB clean-up action

Backups might have been created by various means, such as:

  • Automated procedure as configured by the user in DW
  • Manual backup triggered from within DW via the menu About.Database backup…
  • Manual backup performed using the Tunis.Utils program

The following steps will guide you through the process of restoring an existing DB backup.

  1. Start the Tunis.Utils utility.
  2. Select Restore backup.
  3. It will ask you to select the DB to restore. Do so and click Next.
  4. It will ask where to restore it. The default is to the same folder as where your backup is located. Accept this and click Next.
  5. It will now unpack the DB. When done, click Finish.
  6. Close the program.

Now that the DB is unpacked, you can restore it for DW to use.

  1. Make sure DW is closed.
  2. Navigate to the DW database folder. On a default installation, this can be found here: [drive]:\Topcon Delta Watch\Database
  3. Check if there is a file called TUNIS.FDB. If there is, then this is your current DB. It is strongly recommended that you rename the file at this point.
  4. If there is also a file called SCHEDULER.FDB, rename this file as it belongs to and is linked with the DB you just renamed.
  5. Navigate to the location where you placed the restored backup of your DB at step 4 when unpacking. The filename will be something like tunisdb_firebird_20180302113853.fdb
  6. Copy the file and place it in the DW database folder.
  7. Rename the file to TUNIS.FDB
  8. You can start DW again.

Note: Of course it is possible to restore the DB directly to the database folder giving it the TUNIS.FDB name, as long as you have considered what to do with any existing files here.

Manually creating a DB backup

There are two ways to manually create a DB backup:

  • Using Delta Watch
  • Using Tunis.Utils.exe

The difference is that when using Tunis.Utils.exe, you have a little more control over where and how the DB backup is created.

Using Delta Watch to create a backup

The simplest way to create a manual backup is to use Delta Watch. Even though you have configured automatic backups, you sometimes want to manually trigger the backup process, maybe after you have removed some data or when you completed some lengthy task.

To trigger the backup process, select the Help tab in the menu bar and then select Database backup… 

Depending on the size of the DB, this could take a while.

Using Tunis.Utils.exe

The DB management utility, as described here, should be used if you want control over where the backup is created and/or you want to perform additional actions on the DB. The most important action is being able to permanently remove any deleted records.

  1. Make sure DW is closed.
  2. Open the utility as described above.
  3. Select the option Create backup.
  4. Select the DB from which you want to create a backup. Assuming you want to backup your current DB, this can be found here: [drive]:\Topcon Delta Watch\Database, and the DB is called TUNIS.FDB
  5. Click Next.
  6. Check the name of the backup DB. By default, it goes to the same folder as in step 4 with the extension .bku. If you want, you can change both the location and the filename. Leave the extension as is.
  7. Click Next.
  8. You can specify any additional action to be performed on the DB while a backup is created. By default, no options are selected.
  9. Click Next to start the backup process.

Reducing your DB size

Databases are great, but they tend to grow quickly, and when you delete something, it is not always really deleted. The same is true for a Delta Watch DB. It is possible to reduce the size of your DB—by how much depends on the information it contains.

When DW processes raw geodetic data and converts that to coordinates, it does keep a copy of the raw data, but also it stores things like the network adjustment results. If you have a long-running project, you might not need all this information after a while. You could therefore, at regular intervals, clean up old data from your DB. This benefits space requirements for automatic backups on- or offsite.

When you perform a Cleanup data action in DW, it deletes all unnecessary information from the selected time range but keeps the calculated results.

To reduce your DB size, complete the following steps:

Delta Watch v2.15

  1. In Delta Watch, find the project to which you want to apply the clean-up action.
  2. Navigate to Administration > Automated geodetic networks and select a network.
  3. Right-click on a complete month, or expand the month and right-click on a single day.
  4. Select Cleanup data.
  5. Repeat steps 3 and 4 for any other items in this project.
  6. Repeat steps 1 to 5 for any other project in the DB.
  7. Close Delta Watch and continue with the Tunis.Utils steps.

Delta Watch v3.1

  1. In Delta Watch, find the project to which you want to apply the clean-up action.
  2. Navigate to Administration > Epochs and make your network and time selection.
  3. Select either a complete month or a single day.
  4. Click on Cleanup data in the main toolbar.
  5. Repeat steps 3 and 4 for any other items in this project.
  6. Repeat steps 1 to 5 for any other project in the DB.
  7. Close Delta Watch and continue with the Tunis.Utils steps.

Tunis.Utils

  1. Now create a manual backup using the Tunis.Utils program. Check the option to Skip garbage collection.
  2. When the backup is complete, you can restore it. You will notice the size of your DB has decreased.

Space requirements

It is important to make regular assessments of your space requirements on your monitoring server.  Your DB is growing on a daily basis, and Delta Watch needs a certain amount of free disk space to be able to work and to create and maintain the backups of your data.

When Delta Watch creates a DB, it creates it in a temporary location. Once this is created, the DB is copied to the backup folder and an integrity check is performed on it.

Be sure to take into account the number of DB backups you want DW to keep before recycling them. This requires a certain disk space on top of the space for your working DB.

We always recommend that you start with a minimum of 150GB free space. For most projects, this should be sufficient. But it is good practice to keep an eye on the available free space.

To calculate the total space needed to create and maintain your backups, don’t forget to take into account any space already used by existing backups.

 

Working DB size

4020MB

Check size of TUNIS.FDB

Backup DB size

3200MB

Check size of last backup in Backup folder

Number of backups

10

Found in DW under section Automatic backup in system configuration.

 

 

 

Required space

44GB

(3 x Working_DB) + (NumOfBackups x Backup_DB)