OracleLinux9.4 ; System Backup and Restore

1.Website data backup

1-1 Backup under /var/www/html

Create backup script file

Contents of backup_html.sh

Set permissions

Create save directory and Set permissions

scheduled execution
Add settings to cron to run backups daily at 6:00 a.m.

2.MySQL database backup

Create backup script file

Set permissions

Create save directory and Set permissions

scheduled execution
Add settings to cron for periodic backups

3.Restore backup files under html

 Store HTML backup files in "/ (root)" directory
Specify the backup file with the latest date

Expand file

4.Restore Mysql backup file

①Save the database backup file to any directory and
(In the example, the directory is "/var/www/backup/db_bak".)Extracting data
Select a backup file for the specified date

Restore MySQL database

[su_divider divider_color="#0e0474" size="4"

Copied title and URL