Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 807 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 807 Bytes

MySQL-Auto-Backup

This program automatically creates MySQL database backups.

Setup

  1. Edit config.php to add your database configuration:

    $host = "localhost";
    $user = "database_user";
    $password = "database_password";
    $database = "database_name";
  2. Edit nmail.php to add your email details:

    $sender_email = "from@website.com";
    $recipient_email = "email@website.com";
  3. Visit the URL where you placed index.php, like:

    https://yourwebsite.com/MySQL-Auto-Backup/index.php

Usage

You can use Cron Jobs to automate backups:

0 * * * * wget https://yourwebsite.com/MySQL-Auto-Backup/index.php
0 * * * * wget https://yourwebsite.com/MySQL-Auto-Backup/nmail.php