Skip to content

Backing up data

As described in the introduction we are focusing on databases and customer files only when it comes to backups. So we have to maintain a list of directories containing customer files that should be backed up and we have to produce regular database dumps that then also can be backed up like customer files too.

MySQL dumps

Each host that has a MySQL server installed always comes with a pre-configured dump scenario, that creates database dumps following the default plan:

  • Store the database dumps in /var/backups/mysql
  • Run the dump by cron (time and frequency configurable, see below)
  • Keep dumps as follows:
  • Daily: keep the last 8 days
  • Weekly: keep the Friday dump for the last 5 weeks
  • Monthly: keep the first dump for the last 12 months

The tool used for this is called AutoMySqlBackup.

In the inventory we can configure the variables mysqlbackup and drupal_settings to - exclude certain databases - exclude certain tables within specific databases

The default configuration is this and runs at 2am every morning:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
mysqlbackup:
  active: true
  cron:
    month: *
    day: *
    weekday: *
    hour: 2
    minute: 0
  exclude:
    db:
      - information_schema
      - mysql
      - performance_schema
      - sys
    table: []

Backing up off-site

Now that we've identified and provided the directories and their files that require off-site backup, we can do that with the two following tools and services:

It is possible to use either of these services or even both.


Last update: January 12, 2021 18:06:10