Debian12 ; System Backup and Restore
1. System Backup
1.1 Backup under /var/www/html
① Create backup_all.sh script under /opt/script
1.2 MariaDB database backup
①Create db_backup.sh script under /opt/script
# vi /opt/script/db_backup.sh
db_backup.sh script contents
2. System Restore
2.1 Restore backup files under HTML
① Store HTML backup files used for backup in the "/ (root)" directory
Select the backup file with the latest timestamp (e.g. www_back_20220501.tar.gz)
2.2 Restore MariaDB database
①Save DB backup file to any directory and extract data
# cd /var/www/backup/db_bak