Creating Database Backups

The SeqSphere+ server can create database backups periodically if since the last backup a sample has been saved. By default this option is turned on. Before each backup a database integrity check is done. If a potential database corruption is detected no backup is performed. Furthermore, a warning is shown to users during the next login and all sessions are set to read-only mode. If the SeqSphere+ server is shut down during the foreseen backup time then this backup is not made up once the computer is running again. The backup process has a blocking part, where users cannot login or work on the server because the database is locked. If the last backup has failed (e.g., due to missing writing authorization in directory, network connection problems, etc.) a warning is shown to users during the next login.

Backup Settings

To change the backup settings login as Administrator user and invoke the menu item Button16-SysAdminManager.png Administration | Server System Administration. Then use the button Edit Server Backup Settings to show the Backup Settings window. On top of the window some key data (last backup, backup file size, database size, etc.) of the last backup process are stated. The following options can be specified:

  • Backup directory on server
The backup directory on server defines the location where the backup file(s) should be stored. By default the database backups will be saved in the subdirectory backups of the working directory.
It is highly recommended to put the backup directory on a hard disk other than the database directory! For performance reasons, an internal hard disk is ideally.
  • Schedule automatic backup if samples were saved since last backup
Here the time (24h format) and week days when the backup process should be started if at least one sample was saved since the last backup can be defined. Default is automatic database backup every day at 00:00 turned.
  • Remove old backup files to keep only the ... newest files
Removes automatically all backup files except the defined ... newest files. The deletion is performed after a backup process has successfully finished. If the current backup process fails, no files are deleted. The default is to keep the 2 newest files.
  • Show warning if the oldest sample save without backup is older than ... days
If the oldest sample save without backup is older than the period specified, a warning is shown in the SeqSphere+ CLIENT when a user logs in. In this case any user is allowed to conduct a backup immediately. The default warning setting is 7 days.

Advanced Settings

  • Include contigs (fasta) from file storage path
If enabled contigs (fasta) from the file storage path are included in the backup file. Default is enabled.
  • Include uploaded assembly files (ace/bam) from file storage path
If enabled uploaded assembly files (ace/bam) from the file storage path are included in the backup file. Default is enabled.
  • Compress non-blocking
If this option is enabled, the compressing (zip) of the backup file is done after the database backup command has finished. Therefore the blocking time of the database is much shorter, however, this requires more disk space during the backup process. This option is enabled by default and it is strongly recommended to leave it enabled to reduce the blocking time. If this option is enabled also the compression level, i.e., No compression, Best speed, or Best compression, can be specified. Default is Best speed.
  • Create backup first in backup temp directory and move then to backup directory
If the backup directory is located on a network device (e.g., NAS) and/or to save some space in the backup directory, this option should be enabled to create the backup first in a backup temp directory. By default the temp directory of the system is used. If there is not enough free disk space in the system temp directory, a different backup temp directory on another local disk must be configured here.
  • Don't check sizes of network drives
By default, the sizes of the available disk space for backups is checked before the backup is created, and too low disk space is reported to the SeqSphere+ users. However, there are some network drive environments existing where the size check does not work properly and wrong disk space warnings are elicited. If this happens, the size check for network drives (only drives whose file system path starts with //// are considered here) can be disabled here.
  • Store copy of backup file in directory
If this option is enabled, a server directory must be specified here. This directory must reside on a different hard disk than the database and/or backup directory to protect from data loss due to hard disk failure. All old copies of backup files except the defined ... newest files are automatically removed. The deletion is performed after the copying process has successfully finished. Currently no file size checks are performed for this drive.
  • Set to Default
If this button is pressed, all settings, except for the Backup directory on server, are reset to the default value.

Before each backup and when saving the Backup Settings window the available and presumably for backup needed disk space is checked. A security buffer of the last backup file size divided by 10 is considered here to account for a growing database. If the database directory resides in the same file system location (same hard disk or partition of hard disk) as the backup and/or backup temp directory then the database size divided by 10 is added as an additional buffer. If the size check fails no backup will be performed (during next login all users get a warning) or the new parameters of the Backup Settings window will not be saved (the user gets immediately a message about this). See more details on disk storage required for the database and backups.

A backup process with the current settings can be directly invoked using the button Button16-Backup.png Do Server Backup now in the Server System Administration window.

Restoring Database Backups

Server installed on Windows

  1. Exit the SeqSphere+ server
  2. Choose in the Windows Start menu Ridom SeqSphere Server | Server Database Restore Backup
  3. Choose a backup file from the backup directory

Server installed on Linux

Perform the following steps to restore the most recent backup:

  1. Exit the SeqSphere+ server
  2. Invoke the SeqSphere+ server with command line parameter -restoreLastBackup. The server restores the newest backup file from the backup directory and exits automatically
  3. Start the SeqSphere+ server again (without the command line parameter)

Alternatively, you can use the command line parameter -restoreBackup <backup_file> to choose a specific backup file.

Overwriting Existing Database

When a backup is restored, the existing database is overwritten. Therefore the backup restore process asks if the existing database should be deleted or moved to another directory. If the move option is chosen, the existing database is moved into a directory called old_database in the working directory. This directory is never removed automatically, and must therefore be removed manually to save disk space.

Manually Restoring the Database

It is highly recommended to use the software functions explained above to restore the update. However, it is technically also possible to restore the backup manually. Depending on the backup options that were configured there a two different file formats for the backup file: if the backup is a TGZ file, it only contains the four database files. For restoring those files must be placed in the database directory of the server, replacing any existing files. If the backup is a ZIP file, it contains the two folders data and filestorage. For restoring those folders must replace the database and filestorage directories of the server. The server must always be stopped before any database files or directories are replaced!