Skip to content

Backup and restore Squash data and configuration

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

Saves

Squash 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 database on MariaDB with the user squash-tm'@'localhost :

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

Run this query for PostgreSQL with the user squash-tm :

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

Restore the Database

Run this query to restore Squash's database on MariaDB with the user squash-tm'@'localhost :

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

Run this query for PostgreSQL with the user squash-tm :

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

Focus

After restoring the database, do not forget to verify that the user (squash-tm in the example) in Squash 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:

ALTER DATABASE squashtm OWNER 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'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.propertiesif it contains access to the database;
  • log4j2.xml if particular loggers were added;
  • custom language files if there are any.