Fork me on GitHub

Backup

One of the general rules when working with databases and files is creating and storing regular backups. Eonza encompasses a simple tool to create a backup copy of the database or restore the data from it. Please note, that this method saves and restores the entire database. You can’t backup individual tables and files stored on the disk this way.

To backup or restore the database, click the Backup button on the control page.

Creating a backup copy

To create a backup copy, simply click the Create button. After that, a file named as - dbname-YYYYMMDD-HHMMSS should appear. The file name contains the name of your database and the current date and time, like this mydb-20150616-101530.sql.gz. If you web hosting does not support gz packing (unlikely, but still possible), only the sql file is created. All backup copies are created in the backup subdirectory of the storage directory. The storage directory is specified during the install process and stores uploaded files. The dump of your database is created in the standard format, so it can be used to restore the database using a PhpMyAdmin or mysql command.

We recommend to immediately download the backup copy to your local computer after the backup process completes and delete the remote file on the server. To remove a file, use the Delete item in the dropdown list at the right.

Recovery of the database

If the list of backup copies already has a dump of the database you want to restore, simply select the Restore command in the dropdown list of the right button. Otherwise, you should upload the backup copy you need from the local computer. To do this, select the file on your computer and click the Upload button. The uploaded dump file should be displayed in the list now, so you can choose it to restore the database. Note that when you restore the contents of the database from a backup copy, all changes made to the system after that backup copy was created will be lost.

It could be that the database is damaged, and you cannot login to the Eonza system and use the above restoration method. In that case you can recover your database using the Import section in PhpMyAdmin or run a mysql command specifying a file with the saved dump of the database.