1. Overview
It is important that copies are made of the system files and data to ensure that it can be recovered in the event of a disaster. The system elements to consider for backup are:
- Operating system
- Database
- Files
2. Operating system
The Polstead Preschool website is currently hosted by Kualo Limited who take care of providing a Linux operating system (OS) platform on which to deploy the website. OS backups are done by Kualo Limited and the recovery of the OS service is their responsibility. In addition to the Linux operating system, Kualo Limited also provide the PHP language services and the Apache web server.
3. Database
The Polstead Preschool website makes use of the MySQL database to store most of its data. Kualo Limited makes regular backups of the MySQL database and makes these backup files accessible via the cloud service. In addition, database backups are made by the Polstead administrator on an as-required basis, for example, before undertaking major application changes or upgrading modules or core software components. The Backup and Migrate module is used for taking adhoc backups and the resulting backup files stored to external storage (currently the Polstead 'red stick' USB key).
Alternatively, the MySQL database can be backed up directly from the command line using:
mysqldump -h 10.168.1.51 -u USERNAME -p'PASSWORD' DATABASENAME > ~/backup/YYYY-MM-DD/YYYYMMDD_PP_Backup_Database.sql
4. Application and other files
All the website files are backed up with the following command:
tar -cvpzf ~/backup/YYYY-MM-DD/YYYYMMDD_PP_Backup_Files.tar.gz --one-file-system public_html
Where:
- 'backup' is a folder on the home folder of the Kualo hosting service
- 'YYYY-MM-DD' is a sub-folder of 'backup' for example '2023-01-13'
- 'public_html' is the folder containing all the website files