Files
HomeServerCTs/CT-Files/elkarbackupALP/Extras/MySQLBackup/ReadMe.md
2021-11-18 16:08:24 +00:00

1.5 KiB

MySQL backup tool for Elkarbackup

Explanation

  • Elkarbackup server runs MySQLBackup-RemoteTrigger.sh before starting the backup to login to the target (MySQL) server to run MySQLBackup-Tool.sh with the PRE argument.
    This will ask remote mysql to dump all databases to a SQL file to the local temporary backup location (default: /tmp/mysqlBCK)
  • Elkarbackup will store the temporary backup location
  • Elkarbackup server runs MySQLBackup-RemoteTrigger.sh after running the backup to login to the target (MySQL) server to run MySQLBackup-Tool.sh with the POST argument.
    This will ask the remote to clean the temporary backup location

Setup

Steps on MySQL Server

  • Make sure SSH server is running
  1. Add the SSH public key from root@elkarbackupServer and elkarbackupAPP(Downloaded from cogwheel/settings icon > Manage parameters)
  2. Create a Mysql user with the following Global privilleges: SELECT, PROCESS, SHOW DATABASES, LOCK TABLES, TRIGGER, SHOW VIEW
    be carefull with special charactes in the password
  3. Save MySQLBackup-Tool.sh to /opt/Elkar-MysqlBackup.sh
  4. Update the variables in /opt/Elkar-MysqlBackup.sh to the newly created user

Steps Elkarbackup WebUI

  1. Under script tab add the MySQLBackup-RemoteTrigger.sh with Run as option Before and After Job
  2. Under Jobs tab add the MySQL server as Client
  3. Under Jobs tab> + on the mysql client to add job
  4. Set Path to the temporary backup location (default: /tmp/mysqlBCK) Pre and Post sctipt to the just created script