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 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'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, 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:

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'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.