Viz Mosart Administrator Guide
Version 3.9 | Published November 04, 2019 ©
Backup and Recovery
Since the Viz Mosart Template Database is stored in a MySQL database any backup and recovering strategies offered by the database vendors will apply. Also most MySQL clients offers the possibility to backup and restore the entire database from a single .sql file.
In this section the MySQL command line tools mysqldump and mysql is used for backup and restoring respectively.
mysql.exe and mysqldump.exe is part of MySQL Server, MySQL Workbench or Wampserver installations
Using mysqldump for backups
The command above will create a single .sql file containing the entire Viz Mosart Template Database.
mysqldump [--host=hostname] --user=username --password=password --add-drop-database mosarttemplatedb > backupfile.sql
Using mysql for restore
The command below will restore the Viz Mosart Template Database from a single .sql file as created using the mysqldump command shown in the former section.
mysql [--host=hostname] --user=username --password=password mosarttemplatedb < backupfile.sql
Backup and restore from MySQL clients
The backup and restore operations using the mysqldump and mysql tools is also available in all recommended MySQL client applications. When using a client application ensure the following:
-
Database schema = mosarttemplatedb
-
Export to a single file. I.e. the entire database should be saved on a single file
-
Include drop and create functions. This will ensure that the database is restored as stored on the file.
Example, backup from MySQL Workbench
In MySQL Workbench the export dialog box is obtained from the Server/Data Export menu option. The figure below highlights the recommended options:
Restore from a single .sql file in MySQL Workbench is done via the Server/Data Import dialog. Simply select the .sql file as created during backup.
Example, backup from HeidiSQL
In HeidiSQL the export dialog is obtained from the Tools/Export database as SQL menu option.
In HeidiSQL ensure the following:
-
Drop and Create is selected for both Database(s) and Table(s)
-
Data: is set to "Delete + insert (truncate existing data)"
-
Output: is set to "Single .sql file"
Restore from a single .sql file in HeidiSQL is done via the File/Run SQL file... menu option.