Opened 16 years ago

Closed 7 years ago

#178 closed task (fixed)

Need MySQL Backups on OSGeo1

Reported by: warmerdam Owned by: sac@…
Priority: normal Milestone:
Component: SysAdmin Keywords: backups mysql
Cc: neteler

Description

As far as I can tell the zrm backups were commented out of /etc/cron.d/backup.cron many months ago, and we are now effectively not doing backups of mysql except for whatever the magic tape backups done by peer1 get which might not be in a consistent state.

This ticket, is to capture the task of re-enabling and verifying mysql backups.

This is most critical for the various Drupal instances stored in mysql.

Change History (5)

comment:1 by strk, 7 years ago

Cc: neteler added

osgeo1 was retired. Web (drupal) was moved to osgeo3.

The Bacula backup for /var/lib/mysql does exist, although there isn't a "dump" of the databases being taken, is that what this ticket is about ? I'd note that for the PostgreSQL database on the TracSVN VM we do have a full dump. Also that the same situation exists on the osgeo6 machine, where GRASS is hosted.

comment:2 by strk, 7 years ago

The Bacula config for osgeo6 has a commented-out call to a "export_cms_grassgis.sh" script that is not in the expected location but I've found in /var/www/grass/grass-cms/export_cms_grassgis.sh - the script seems to require interaction (to enter a password) and seems to be run manually by Markus (last time in Nov 13) -- Markus, could that script be turned into a generic "dump each database" script ? If it outputs backups under /osgeo/backup it'll be automatically included in the bacula backup (this is more or less what's done on TracSVN).

in reply to:  2 comment:3 by neteler, 7 years ago

Replying to strk:

The Bacula config for osgeo6 has a commented-out call to a "export_cms_grassgis.sh" script that is not in the expected location but I've found in /var/www/grass/grass-cms/export_cms_grassgis.sh

Yes, that is the script which I wrote.

  • the script seems to require interaction (to enter a password) and seems to be run manually by Markus (last time in Nov 13)

Confirmed. And run again today.

-- Markus, could that script be turned into a generic "dump each database" script ? If it outputs backups under /osgeo/backup it'll be automatically included in the bacula backup (this is more or less what's done on TracSVN).

Sure, feel free to recycle it. And it needs to go into a cronjob as well.

comment:4 by strk, 7 years ago

Bacula config can run it, no need to be in a cronjob. This is what is done with PosgreSQL dumps (machines have a PGDump.sh script in /usr/local/sbin that's run before each Bacula update run)

comment:5 by strk, 7 years ago

Resolution: fixed
Status: newclosed

So I've added an /osgeo/backup/mysql_backup.sh script that takes care of creating a dump of each stored database. The script is called by /osgeo/backup/bacula_before.sh, which is called just before backing up the files (which include /osgeo directory). The script drops a tarball with all the dumps under the /osgeo directory. A bacula_after.sh script, in the same directory as bacula_before.sh, takes care of dropping the dump after the bacup is completed.

Closing this as completed. Feel free to file open new ones for more backup issues.

Note: See TracTickets for help on using tickets.