Backup and restore
Everything in a TempusServa installation is stored in the underlying database.
A full backup plan will only require frequent snapshots of the database.
The only exception to the all-in-the-database policy is
- Connection string for the database
- Container ressources such as SSL certficates
Depending on the amount of data stored in the database, we usually recommend using af differencial backup.
Note: The database should allways be stopped during backups, to ensure integrity of a filesystem backup.
UNIX server tools
Using the Command line tools you can set up a RSYNC differntial backup easily.
Procedure for a Windows backup server
- Tempus Serva Server:
- Run tsrsyncdump.sh (test run)
- Run tsinstallcronjobs.sh (future scheduled runs)
- Windows backup machine:
- Install Cygwin tools: http://www.cygwin.com/
- Edit the serverBackup.sh to fit your environment
- Run serverBackup.bat (test run)
- Create a scheduled job pointing to serverBackup.bat file (future scheduled runs)
The service will call the tsrsyncdump.sh every 24 hours, making a dump ready for remote synchronization.
Windows server backup
- Create .bat file
- Use mysqldump to backup all of the databases
- Copy files to safe location (network drive etc.)
- Execute above file scheduled from the Windows task manager
Configuring the mysqldump i straitfroward using the MySQL documentation and examples
Backup synchronization (Linux server to Windows storage)
The following article describes incremental backup files can be transferred from a Linux server to a Windows client
Secure rsync from Linux webservers to Windows backup host.pdf
Corrupted databases
Try in the following order
- Run the mysqlcheck tool
- Dump database if possible using mysqldump
- Connect remotely and dump SQL script files of each table
Problems with views
In some cases database views will be treated as tables which requires them to be deleted
DROP TABLE IF EXISTS authenticationtype; DROP TABLE IF EXISTS cleanuppolicy; DROP TABLE IF EXISTS datatypegroup; DROP TABLE IF EXISTS datatypegroupsub; DROP TABLE IF EXISTS datatypemapping; DROP TABLE IF EXISTS defaultsystemconfig; DROP TABLE IF EXISTS eventdomain; DROP TABLE IF EXISTS eventseverity; DROP TABLE IF EXISTS formstatusactiontype; DROP TABLE IF EXISTS guilanguage_copy; DROP TABLE IF EXISTS guilanguageterm; DROP TABLE IF EXISTS guilanguageword_copy; DROP TABLE IF EXISTS guistyle_copy; DROP TABLE IF EXISTS integrationtype; DROP TABLE IF EXISTS messagetype; DROP TABLE IF EXISTS persistencescope; DROP TABLE IF EXISTS persistencetype; DROP TABLE IF EXISTS remotedatabasedriver; DROP TABLE IF EXISTS reservednames; DROP TABLE IF EXISTS satelitemode; DROP TABLE IF EXISTS sharemediatype; DROP TABLE IF EXISTS sqllogcrud; DROP TABLE IF EXISTS sqllogtarget; DROP TABLE IF EXISTS staticdatacountry; DROP TABLE IF EXISTS staticdatacountrycode; DROP TABLE IF EXISTS staticdatacurrencycode; DROP TABLE IF EXISTS staticdatanace; DROP TABLE IF EXISTS staticdatapostalcode; DROP TABLE IF EXISTS staticdataunspsc; DROP TABLE IF EXISTS staticicddiagnose; DROP TABLE IF EXISTS staticsksatc; DROP TABLE IF EXISTS staticsksbehandling; DROP TABLE IF EXISTS staticsksdiagnose; DROP TABLE IF EXISTS staticsksoperation; DROP TABLE IF EXISTS staticskssygehusafdeling; DROP TABLE IF EXISTS staticsksulykke; DROP TABLE IF EXISTS staticsksundersoegelse; DROP TABLE IF EXISTS statisticsftest; DROP TABLE IF EXISTS systemcodeunittype; DROP TABLE IF EXISTS systemconfiggroup; DROP TABLE IF EXISTS systemconfigvalue; DROP TABLE IF EXISTS systemdatatype; DROP TABLE IF EXISTS systemdatatypegroups; DROP TABLE IF EXISTS systemdatatypepackage; DROP TABLE IF EXISTS systemformat; DROP TABLE IF EXISTS systemhelp; DROP TABLE IF EXISTS systemindicatorview; DROP TABLE IF EXISTS systemmodelvariabletype; DROP TABLE IF EXISTS systemnamedquerys; DROP TABLE IF EXISTS systemoperator; DROP TABLE IF EXISTS systempolicygroup; DROP TABLE IF EXISTS systempolicymeta; DROP TABLE IF EXISTS systemsamplevalue; DROP TABLE IF EXISTS systemstate; DROP TABLE IF EXISTS userflagtype; DROP TABLE IF EXISTS usermenulayout; DROP TABLE IF EXISTS usermenulevel; DROP TABLE IF EXISTS version; DROP TABLE IF EXISTS widgetlayout; DROP TABLE IF EXISTS widgetposition; DROP TABLE IF EXISTS widgettype;