業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

Debian11.11 : System Backup and Restore

1. System Backup

1.1 Backup under /var/www/html

① Create backup_all.sh script under /opt

backup_all.sh script contents
10-day data storage

Create a directory to store backup files

Add settings to cron for periodic backups

1.2  Mysql database backup

Create db_backup.sh script under /opt

db_backup.sh script contents
Data storage for 10 days

Create a directory to store backup files

Add settings to cron for periodic backups

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_20250408.tar.gz)

2.2  Restore MySQL database

Save DB backup file to any directory and extract data

Restore MySQL

Copied title and URL