Taking backups of our store on a regular basis is essential to safeguard our store against the disasters that can occur on a hosting server.
In this recipe, we will learn how to back up our system regularly and restore it if needed.
Let's go to System | Backup | Restore in the administration panel. All the data items are automatically selected for us. We will just click on the Backup button.
The system will generate a file with a
.sql
extension. We need to save it in a safe place on our computer.We will now open cPanel File Manager and compress all the stored files into a
store.zip
file. After that, we will download it and save it in the same safe place on our computer.
In the case of a disaster, we will need to restore our system using our backup files and data. But first we need to delete all the current files on the server. Let's open cPanel File Manager, choose all the files, and delete them.
Then we will upload the
store.zip
file, which we have saved previously, and extract it to the same location.Now it is time to learn how to restore the data. Let's go to System | Backup | Restore, choose the backup file (next to Restore Backup), and click on the Restore button.
That was the final step in the restoration of an OpenCart system.