Backup Tools

Your installation of Squore includes some scripts designed to help save and restore snapshots of your analysis data. These scripts will allow you to:

The scripts are located in the <SQUORE_HOME>/bin folder of the Squore installation directory.

Note

Before launching a backup or restore operation, stop Squore Server completely and start the Squore Database using the scripts in <SQUORE_HOME>/bin.

Backing-Up the Squore Installation

The contents of the Squore Database and file system can be saved using the backup script located in the <SQUORE_HOME>/bin folder of the Squore installation directory.

Executing this script creates a folder containing a database dump and a backup of the file system in the location configured in <SQUORE_HOME>/config.xml. This backup folder can later be used by a script that restores database and file system snapshots, which we will cover in the next section.

On Windows

  • Launch Start > Squoring > Squore > Admin > Backup Data

Tip

You can also run backup.bat from <SQUORE_HOME>/bin followed by a path to backup directly to this folder.

On Linux

  • Run the Squore backup script in a command shell: <SQUORE_HOME>/bin/backup

Tip

The script accepts an optional path argument to backup directly to the specified folder instead of using the default one specified at installation time.

Automating Backups

The Windows and Linux backup scripts accept a parameter that is used as the path to store the backup in. this makes it possible to use a scheduled task on Windows or a cron job on Linux to automate your backups.

Tip

Backups can be launched while the server is running, but it is recommended to regularly perform a backup while the server is stopped. This guarantees that the database and the data files are in sync, which may not be the case if your server is started and analyses are running.

Restoring Squore Data

A previously backed-up Squore snapshot can be restored using the restore script from the <SQUORE_HOME>/bin folder.

The script uses the data dump in the backup folder specified when installing Squore to restore the database and file data for this snapshot.

On Windows

  1. Shutdown Squore Server: Start > Squoring > Squore > Launch > stop-server.bat

  2. Launch Start > Squoring > Squore > Admin > Restore Saved Data

  3. Start the Squore Application server again after the script finishes via Start > Squoring > Squore > Launch > start-server.bat

On Linux

  1. Shutdown Squore Server: <SQUORE_HOME>/bin/sqctl stop

  2. Start the database cluster: <SQUORE_HOME>/bin/pgctl start

  3. Run the restore script in a command shell: <SQUORE_HOME>/bin/restore backup_folder

  4. Start Squore Server again after the script finishes via <SQUORE_HOME>/bin/sqctl start

Resetting the Squore Installation

You can reset the Squore installation to its initial state, and therefore delete all your projects and users using the restore script located in the <SQUORE_HOME>/bin folder of the Squore installation directory.

On Windows

  1. Shutdown Squore Server: Start > Squoring > Squore > Launch > ShutdownServer

  2. Launch Start > Squoring > Squore > Admin > Clear Data

  3. Start Squore Server after the script finishes, via Start > Squoring > Squore > Launch > start-server.bat

Alternatively, you can use <SQUORE_HOME>/restore-empty.bat instead of using the Start Menu entry.

On Linux

  1. Shutdown the Squore server: <SQUORE_HOME>/bin/sqctl stop

  2. Start the database cluster: <SQUORE_HOME>/bin/pgctl start

  3. Run the Squore Database reset script in a command shell: <SQUORE_HOME>/bin/restore -E

  4. Start Squore Server after the script completes via <SQUORE_HOME>/bin/sqctl start