User Tools

Site Tools


Backup and cleanup tasks

Backup files should be generated and stored on a offsite machine in case of failure.

Scheduled cleanup of unnecessary files will keep drives from becoming full.


Backup a MySQL database

The following MySQL commands will help to insure that a remote database my be recovered if storage media or a machine fails.

If the database machine is different from the EASA Server, it must have independent backups.

The folder '<EASAROOT>\db\mysql-5.7.17-win32\bin\' contains useful commandline executables.

Commands to make database backups:

  • mysqldump.exe schema_name > db_name-$(date +%Y%m%d).sql
    To back up database db_name to a date-stamped filename
  • mysqldump.exe -u root -p --databases db_a db_b > databases_a_and_b.sql
    To back up databases schema_a and schema_b
  • mysqldump.exe -u root -p --all-databases > all_dbs.sql
    To backup all mysql databases

Commands to restore databases from a backup (delete any existing database of that name and create a new one):

  • mysqld.exe db_name < file.sql
    To restore a single database
  • mysql.exe --one-database db_name <all_dbs.sql
    To restore a single database from a mult-database backup file

Use 'cron' (Cygwin or Linux) or Windows 'Task Scheduler' to automate database backup.


Back up important EASA files

We suggest two possibilities to protect EASA data in the event of hardware failure:

  1. Backup each of the two folders with EASA data to a storage medium or to a third party cloud service,
    <EASAROOT> - data for the default local MySQL instance is found in: db\mysql-5.7.17-win32\
    <SERVERDATA>
  2. Alternatively, run: EASA > Set Mode > Administrator > System > Backup
    There are two types of backups available, described in detail below:
    Immediate
    Scheduled

Immediate backup

  1. Select the 'Type' of data to copy, explained below
  2. Enter the full path for the 'Backup Directory' for the copy (ideally an offsite network drive).
  3. Click on the 'Backup Now' button.
MinimalAll files in the admin folder will be backed up
All Author DataAll files in the admin and applications folders will be backed up
All DataAll files in the admin, applications and users folders will be backed up

Scheduled backup

  1. Select a 'Frequency' for a regularly scheduled backup, choose from…
    • Daily - select the hour of the day
    • Weekly - select the day of the week and the hour of the day
  2. Select a choice from above table for which 'Type' data to copy
  3. Enter the full path for the 'Backup Directory' to which the data will be copied
  4. Click on the 'Update Settings' button to save these settings

Scheduled Cleanup

EASAPs that submit themselves to the EASA Server create a folder for themselves to work in on the server side. If the files are not handled in any way, they can build up and eventually occupy a large portion of the drive space.

To enable automated cleanups, uncomment and adjust the following line in: <SERVERDATA>/easa/admin/config/System.properties

  • #easa.server.deleteoldsims.threshold.days=90
  • Stop and then restart the EASA service

By default this option is disabled.

Remove Old Results Automatically

Batch software often generates large files so EASA may be set to automatically delete historic Results.

Modify: <SERVERDATA>\easa\admin\config\context.properties

  • Remove the hashtag (ie. 'uncomment') and update the number of days from this line
    #easa.server.deleteoldsims.threshold.days=30
  • Remove the hashtag (uncomment) and update the number of milliseconds EASA waits to check for new results
    #easa.server.deleteoldsims.loop.wait.millis=
    (one hour if left blank, the default)