Skip to content

Backup and restore Squash TM data and configuration

On this page, you can find information related to backing up Squash TM database and configuration.

Saves

Squash TM does not offer any particular saving mechanism. The only items you should save are:

  • the database;
  • the configuration files in the 'bin' and 'conf' folders.

Save the Database

Run this query to save the Squash TM database on MariaDB with a super user account:

mysqldump -u <username> -p<password> -D <squashtm database> > path/backup.sql

Run this query for PostgreSQL with a super user account:

pg_dump -p <port> --username <username> <squashtm database> > path/backup.sql

Restore the Database

Run this query to restore Squash TM's database on MariaDB with a super user account:

mysql -u root -p<password> <squashtm database> < path/backup.sql

Run this query for PostgreSQL with a super user account:

psql -p <port> --username <username> <squashtm database> < path/backup.sql

Focus

After restoring the database with a super user account, don't forget to verify that the user ('squash-tm' in the example) in Squash TM still has the necessary rights on the database. If that is not the case, please run the following requests:

MariaDB:

GRANT ALL ON squashtm.* TO 'squash-tm'@'localhost';
FLUSH PRIVILEGES;

PostgreSQL:

GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";

It is recommended to check that the triggers are present in the database after a restoration.

Query to run for MariaDB:

show triggers;

Query to run for PostgreSQL:

select * from information_schema.triggers;

There should be 20 triggers in the database.

Save Configuration Files

To save Squash TM's configuration, copy the following files:

  • startup.sh or startup.bat;
  • squash.tm.cfg.properties;
  • squash.tm.cfg-mariadb.properties or squash.tm.cfg-postgresql.properties if it contains access to the database;
  • log4j2.xml if particular loggers were added;
  • custom language files if there are any.