Version 1 (modified by Ross, 6 years ago) (diff)



Puppet uses the m_backupninja class to tell servers how to make backups. This class is standard for all of our server manifests, and controls rdiff and rsync backups. In standard manifests, a version of this stanza exists, which changes based on which backup servers the server writes to.:

if ( $::fqdn == "" ) or ( $::fqdn == "" ) {                                          
  m_backupninja::server::configure_node { "acholonu": }

mysql backups

In addition servers can backup mysql databases. By default MOSHes backup all mysql databases, and any server can be required to make daily mysql backups.

standard mysql backups

The standard mysql backup requires a single directive in the manifest file that looks like:

class { "m_backupninja::mysql": }

This stanza says, "Do a full backup of all mysql databases." However, this is not always ideal as some of these databases can grow quite large due to caching and indexing tables, particularly for Drupal databases.

truncated mysql backups

If you need to reduce the size of mysql backups, you can do so by changing the m_backupninja stanza to:

class { "m_backupninja::mysql_diet" }

This stanza uses a different backup script which calls the mf-mysql-dump script, and this removes caching and other tables from the mysqldump to ease the weight of the actual dump. If you run into problems with mysql dumps for Drupal sites, this is a good option for avoiding those problems.