Manual for OpenEstate-ImmoTool


Backup & restore databases

For everyday usage it is highly recommended to find and implement a strategy for regular backups. This chapter describes different approaches about how to backup the databases of ImmoTool and ImmoTool-Server.

Please consider, that you have to follow different approaches for single-user installations and multi-user installations (see "How ImmoTool can be installed…").

Backup single-user installations

On single-user installations the database is managed by the Immotool itself (see "Installing on a single workplace"). Therefore in most cases the backup should be executed from the same system, on which ImmoTool is installed.

Copy project folder

The easiest way of backing up a single-user installation is copying the project directory. Find out where your project directory is located and copy this folder accordingly.

Manual backup via ImmoTool

After the local project was opened in ImmoTool you can click in the main menu at "Extras → Database → Backup" in order to create a database backup manually. A dialog window is shown, where you can select the save location of the backup file.

Automatic backup via ImmoTool

As an alternative to a manual backup you can configure automatic backups for local projects (single-user installations). In this case the application will automatically create backups in certain situations.

After the local project was opened in ImmoTool you can click in the main menu at "Extras → Settings" in order to open the settings dialog window. After selecting the form "Database" you will see the following view:

Configure automatic backups

Configure automatic backups

You can choose a target folder, where automatic backups are saved at. Besides this you may choose, in which case an automatic should be created (e.g. while the project is opened).

The number selected as "Limit" determines, how many backups are kept in the selected target directory. For example if more than five backups are stored in the target directory, the oldest backups are automatically removed. The defined limit will not be exceeded.

Restoring a backup

If the project directory was copied (see "Copy project folder"), you can simple copy the folder back to its original location. Afterwards the project can be opened again with ImmoTool. Further steps for restoring the backup are not necessary in this case.

Backups created within ImmoTool have been stored as TAR.GZ archives (see "Manual backup via ImmoTool" and "Automatic backup via ImmoTool"). In order to restore these archives you can follow these steps:

  1. Close ImmoTool, if it is currently running.
  2. Extract the TAR.GZ archive, that contains the database backup.
  3. Open the project directory in your file browser (Explorer / Finder).
  4. Rename the data subfolder - e.g. to data-old.
  5. Create a new / empty data subfolder.
  6. Copy the files extracted from step 2 into the newly created data folder.
  7. Start ImmoTool and open the project.

If the restored project was successfully opened, you might remove the folder data-old created in step 4.

Backup multi-user installations

On multi-user installations the database is managed by Immotool-Server (see "Installing on a multiple workplaces"). Therefore in most cases the backup should be executed from the same system, on which ImmoTool-Server is installed.

Backup an inactive ImmoTool-Server

If ImmoTool-Server is not running (or was temporarily stopped), you can copy its data directory. By default this directory contains the files of all managed databases.

Backup a running ImmoTool-Server

You can create backups of ImmoTool-Server while the application is running. For this use case the helper application "ManagerBackup" is provided.

  • On Windows you can open start menu and select the shortcut "OpenEstate-ImmoServer → Management → Create database backup".
  • On macOS you can open the application bundle "OpenEstate-ImmoServer" and start the "ManagerBackup" application.
  • Alternatively you can start the ManagerBackup.exe / ManagerBackup.bat / ManagerBackup.sh file in the bin subfolder of the application directory.

The ManagerBackup application needs to connect with the databases to backup. Therefore the application needs to login with an administrative account for all databases to backup.

Open the manager.conf file in the configuration directory with a text editor. For each database to backup you need to provide these lines:

urlid immotool
url jdbc:hsqldb:hsql://localhost:9001/immotool
username SA
password

After the password value you need to enter the password of the database administrator (SA) separated by space - e.g. password test1234 (see "Configure manager applications").

By default the ManagerBackup application creates a backup for all databases specified in the manager.conf file. By default the application stores the backup into the backups subfolder of the data directory.

Automatic backup on Windows

The Windows operating system provides a dialog window for task scheduling, which can be used for automatic execution of the ManagerBackup application at freely chosen times.

Open the Windows Task Scheduler application:

  1. Press the "Windows key" together with the letter "R" to open a window for command execution. Alternatively you can open the command prompt.

  2. Enter the command taskschd.msc and press the "ENTER" key.

Click on the right side in the "Actions" section on the "Create task" link.

Create task for automatic backup

Create task for automatic backup

A new dialog window shows up, which allows the creation of the backup task.

General settings for the task

General settings for the task

Open the tab "General" and enter a suitable name and description for the task. Besides this you should click on the "Change User or Group" button and select the "Local Service" user.

Zeit der Ausführung wählen

Zeit der Ausführung wählen

Open the tab "Triggers" in order to configure the execution time of automated backups.

Auszuführendes Programm wählen

Auszuführendes Programm wählen

Open the tab "Actions" and select the ManagerBackup.exe application from the bin subfolder of the application directory.

You may change further settings in this dialog window. After you have completed the configuration, click on the "OK" button in order to register the task in the operating system.

Automatic backup on macOS

While installing a service for ImmoTool-Server on macOS you can enable daily automatic backups (see "Setup service on macOS").

If automated backups were enabled while installing the service, the script creates a file org.openestate.tool.server.backup.plist in the /Library/LaunchDaemons directory. This file tells the operating system to automatically execute ManagerBackup once in a day.

Automatic backup on Linux

If ImmoTool-Server was installed with the Debian package, a timer for daily automated backups is already installed.

Alternatively a timer can be registered, while a service for ImmoTool-Server on Linux is installed (see "Setup service on Linux").

The files openestate-immoserver-backup.timer and openestate-immoserver-backup.service in the /etc/systemd folder are used to trigger automatic execution of the ManagerBackup application.

Parameters for ManagerBackup

The ManagerBackup can be controlled by the following command line parameters:

  • -help
    Shows a summary of available command line arguments.

  • -conf <file>
    You may specify a custom path to the manager.conf configuration file.

  • -id <urlid>
    Only the database with identifier <urlid> from the manager.conf file should be backed up. Otherwise all configured database are backed up.

  • -dir <path>
    You may specify a directory at <path>, where backups are stored.

  • -limit <number>
    You may set the maximal number <number> of backups to keep for each database. Older backups are automatically removed, if the limit is exceeded.

  • -delay <seconds>
    You may delay the execution of the backup for <seconds> seconds.

  • -wait
    After the backup was successfully executed the applications waits for the user to press the "ENTER" key.

  • -dump
    Create a database dump instead of copying the database files.

Restoring a server backup

A database backup is a copy of the database files. You can restore these files quite easily by following these steps:

  1. Stop ImmoTool-Server, if it is currently running.

  2. If the backup is created as ZIP or TAR.GZ archive, extract these files accordingly.

  3. Rename the database directory and create a new / empty database directory with the same name.

  4. Copy the database files db.data, db.lobs, db.properties & db.script into the database directory (see "Data directory of ImmoTool-Server").

  5. Start ImmoTool-Server in order to make the restored databases available.

If the restored project was successfully opened, you might remove the renamed database directory created in step 3.

Table of contents

last modified at 04/07/2019 at 07:32 PM (CEST)

Creative Commons License This documentation is licensed under the terms of Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.