|
1 | 1 | # MySQL-Auto-Backup |
2 | | -This program will create mysql database backup automatically |
3 | | - |
4 | | -Edit config.php to add your config like following |
5 | | -$host = "localhost"; |
6 | | -$user = "database_user"; |
7 | | -$password = "database_password"; |
8 | | -$database = "database_name"; |
9 | | - |
10 | | -Edit nmail.php to add your email in these fields |
11 | | -$sender_email = " [email protected]"; |
12 | | -$recipient_email = " [email protected]"; |
13 | | - |
14 | | -Just visit url where you placed index.php like |
15 | | -https://yourwebsite.com/MySQL-Auto-Backup/index.php |
16 | | -You can use Cron Jobs |
17 | | -0 * * * * wget https://yourwebsite.com/MySQL-Auto-Backup/index.php |
18 | | -0 * * * * wget https://yourwebsite.com/MySQL-Auto-Backup/nmail.php |
19 | | - |
20 | | -Simplest way to make automated backups |
21 | | -Thanks |
22 | | -If you need help then contact me on whatsapp |
23 | | -[https://wa.me/923344933334](https://wa.me/923344933334) |
| 2 | + |
| 3 | +This program automatically creates MySQL database backups. |
| 4 | + |
| 5 | +## Setup |
| 6 | + |
| 7 | +1. Edit `config.php` to add your database configuration: |
| 8 | + |
| 9 | + ```php |
| 10 | + $host = "localhost"; |
| 11 | + $user = "database_user"; |
| 12 | + $password = "database_password"; |
| 13 | + $database = "database_name"; |
| 14 | + ``` |
| 15 | + |
| 16 | +2. Edit `nmail.php` to add your email details: |
| 17 | + |
| 18 | + ```php |
| 19 | + $sender_email = " [email protected]"; |
| 20 | + $recipient_email = " [email protected]"; |
| 21 | + ``` |
| 22 | + |
| 23 | +3. Visit the URL where you placed `index.php`, like: |
| 24 | + |
| 25 | + [https://yourwebsite.com/MySQL-Auto-Backup/index.php](https://yourwebsite.com/MySQL-Auto-Backup/index.php) |
| 26 | + |
| 27 | +## Usage |
| 28 | + |
| 29 | +You can use Cron Jobs to automate backups: |
| 30 | + |
| 31 | +```cron |
| 32 | +0 * * * * wget https://yourwebsite.com/MySQL-Auto-Backup/index.php |
| 33 | +0 * * * * wget https://yourwebsite.com/MySQL-Auto-Backup/nmail.php |
0 commit comments