Backing up and recovering Hansoft data

The Hansoft database should be backed up on a regular basis. If a database is corrupted or lost because of disk errors or a hardware problem, you can recover the database using backups. See Restoring databases from backups.

By default, all new databases have a scheduled backup task that runs daily. See Scheduling automatic database backups.

Database contents

The database consists of the following parts:

  • Transaction log — Contains all changes to the current project data since the last backup.
  • Database file — Contains all current project data except changes since the last backup.
  • Historical data and documents directories — Contain all historical project data and attachments (also known as documents). These are separate directories that are not stored with the project data.

Backup options

You can choose one of the following backup options depending on your environment, needs, and database size.

  • Project history — Use to back up individual parts of a project for comparison or recovery. See the Hansoft user guide for more information.
  • Built-in backup tool — Use to back up databases smaller than 100 GB hosted on any operating system. Manually run or schedule these backups from the Hansoft Server Administrator. You can choose different types of backups depending on your needs. See Database backup types. The built-in backup tool restricts user access to project history and documents during backups. See Performing manual database backups and Scheduling automatic database backups.
  • Backup service — Use to automatically back up databases larger than 100 GB on Windows only. The service always performs a full backup, including project history and documents. It does not restrict access to history and documents during backups. See Using the Hansoft Backup Service.

Tip:  We recommend that you also create regular database snapshots, as this will help to keep the transaction log from growing too big.

  • Virtual machine (VM) and other external backup solutions — Use to back up the entire host for the Hansoft database. Contact your IT team for help with this solution.

Recommendations

We recommend implementing the following backup strategy to minimize data loss in case of hardware or other failure.

  • Schedule two backup tasks to run once per day. Run these backups 12 hours apart.
  • One that uses the Database snapshot backup type.
  • One that uses the Incremental full backup including history and documents backup type. Schedule this backup during low times of server load.

Tip:  If these backups impact Hansoft usage for users, consider using the backup service daily instead. Note that this is only applicable to full backups, and we recommend that you still create regular snapshots.

  • Schedule a full database backup at least once per week to avoid having to restore several incremental backups in case of failure.
  • Store backups on a separate disk from the database you are backing up. You can change the backup location in the database properties.
  • Monitor disk usage on the Hansoft server and the storage you use for backups to make sure actions can be taken before the disk is full. You can have parts of the database on different disks using symbolic links.
  • If you use a virtual machine, take regular snapshots of it.

Known issues