Backing up the H2 database
The configuration parameters of the H2 database backup are already set by default so that the backup occurs on an daily basis.
To change this configuration, edit the configuration file: <ApplicationPath>/WEB-INF/classes/configuration.properties
The cron-based backup of the embedded database triggers everyday at 3.45 am all year round. The syntax reads as follows "Seconds Minutes Hours Day-of-month Month Day-of-week Year". For example:
-
0 45 3 ? * * * (default setting - trigger every day at 3.45 am)
-
0 45 5 ? * MON-FRI (every Monday, Tuesday, Wednesday, Thursday, and Friday at 5.45 am)
More examples are available onhttp://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/tutorial-lesson-06.html .
Other automatic backups are performed at startup and shutdown of the application server:
database.embedded.backup.doBackupAtStartup=true
database.embedded.backup.doBackupAtShutdown=true
The backup files are stored at the following location, up to the 30 latest backups: <ApplicationPath>/WEB-INF/database/backups