Ubuntu Server24.04 ; System Backup & Restore

1. System Backup

1.1 Backup under /var/www/html

①Create /var/www/system directory

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

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 MariaDB database backup

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

db_backup.sh script contents

③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
Example:www_back_20240505.tar.gz)

2.2  Restore MariaDB database

①Save DB backup file to any directory and decompress data

②Restore MariaDB

Copied title and URL