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

Ubuntu Server25.10 : System Backup and Restore

1. System backup

1.1Backup under /var/www/html

②Create the backup_all.sh script under /opt/script/

backup_all.sh script contents
10-day data retention

③Create a directory to store backup files

④Add a setting to cron to perform regular backups.

1.2 MySQL Database Backup

①Create the db_backup.sh script under /opt/script

db_backup.sh script contents

③Add a setting to cron to perform regular backups.

2. System Restore

2.1 Restoring Backup Files Under HTML

①Store the HTML backup file used for backups in the "/" (root) directory.
Select the backup file with the most recent timestamp.
(Example : www_back_20260114.tar.gz)

2.2 Restore MySQL Database

①Save the DB backup file to any directory and extract the data.

②Restore MySQL

Copied title and URL