Backup of Remote Servers

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

When the server on which ZRM for MySQL is running is different from the server on which MySQL database that is to be backed up resides that server is called remote MySQL server. Backing up in full such a remote server is well within the capabilities of ZRM for MySQL. However, certain standard conditions are required to be meet.

Following diagram shows the local server running ZRM for MySQL backing up two more MySQL servers with multiple MySQL database.

The advantage of configuring ZRM for MySQL on one machine and then configuring it to back up all of the MySQL servers is that you can consolidate all of the backups on one single machine.

Contents

Conditions for Backing Up Remote MySQL Servers

  • The Backup user should be granted the same backup privileges on the remote MySQL server and server running ZRM. Please see MySQL Backup User for more details on the backup user privileges.
  • There should be sufficient space on the local machine to store the backup image of the remote server.
  • For raw backup mode, one of the following should be configured
    • ssh between the backup host and the remote MySQL server.
    • The ZRM for MySQL's socket-server should be installed on the remote MySQL server.
  • ZRM client package must be installed on the MySQL server.

Configuration Parameters

When backing up a remote server the first step is to define one or more backup sets for the remote server.

Logical Backups

ZRM for MySQL can use mysqldump to do backups of remote MySQL servers when backup-mode is specified as logical. For logical backups of remote MySQL servers it is recommended to use SSL authentication between local ZRM for MySQL server and remote MySQL server.

The parameters that need to be specified to do a backup of all the databases on a remote host called host1.company.com are

host=host1.company.com
user=backup
password=abc123
backup-mode=logical
ssl-options="--ssl --ssl-ca=file1 --ssl-cert=file2 --ssl-key=file3"

For more details please see the chapter on backup set parameters

Raw Backups and Incremental Backups

For raw backups and for incremental backups, either the SSH based copy plugin or the socket based copy plugin can be configured. If data security is a concern please use the SSH based copy plugin.

The parameters that need to be specified to do a backup of all the databases on a remote host called host1.company.com are

host=host1.company.com
user=backup
password=abc123
backup-mode=raw
copy-plugin=/usr/share/mysql-zrm/plugins/ssh-plugin.pl

For more details please see the chapter on backup set parameters

Please see Example Configuration for a detailed example of configuring ZRM for MySQL for backup of a local and a remote MySQL server.

Personal tools