Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

Ubuntu Server 20.04 : System Backup and Restore

1. System backup

1.1 Backup under /var/www/html

①Create the /var/www/system directory

②Create a script "backup_all.sh" under /var/www/system

Contents of the "backup_all.sh" script

③Create a directory to store the backup files

④Add a configuration to cron to backup regularly

1.2 Mysql Database Backup

①Create a script "db_backup.sh" under /var/www/system

Contents of "db_backup.sh" script

②Create a directory to store the backup files

③Add a configuration to cron to backup regularly

2. System Restore

2.1 Restore files under HTML with backup files

① Store HTML backup files used for backup in the "/ (root)" directory
Select the backup file with the latest timestamp (e.g. www_back_20211201.tar.gz)

2.2 Restore MySQL database

①Save the Mysql database backup file to any directory and unzip the data

②Restore MySQL database

Copied title and URL