PHP code example of indiehd / mysql-db-backup

1. Go to this page and download the library: Download indiehd/mysql-db-backup library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

indiehd / mysql-db-backup example snippets

sql
-- Same as Scenario B
CREATE USER 'backup'@'%' IDENTIFIED BY 'your_strong_password';
GRANT SELECT, LOCK TABLES, SHOW VIEW, TRIGGER, EVENT ON *.* TO 'backup'@'%';
GRANT SELECT ON mysql.proc TO 'backup'@'%';
FLUSH PRIVILEGES;
bash
cp db-backup.ini.example db-backup.ini
ini
[connection]
hostname = localhost
port = 3306
username = your_mysql_user
password = your_mysql_password
; ssl_ca = /etc/ssl/certs/db-ca.pem

[backup]
dumpdir = /path/to/backups
; databases = app,analytics
; dump_options = --set-gtid-purged=OFF