|
Backing up and Restoring the Database |
|
|
Database backups are performed for safekeeping to prevent the loss of valuable business data in case the original store database is corrupted or otherwise damaged. Backing up the Database In order to perform a backup, choose the 'DB Backup/Restore' section from the 'Maintenance' menu of the Administrator Zone. You will see the contents of the 'Backup database' tab (Figure 4-1). LiteCommerce software uses SQL format (also called SQL dump) files for backup purposes. You can choose one of the two alternative ways of creating a backup of your store database:
Note: If the 'var/backup/sqldump.sql.php' file already exists on the server, it will be overwritten. ![]() Figure 4-1: Backing up the store database Depending on the volume of your business information in the database (which includes order, customer, catalog and other data) backup procedures can take up to several minutes. Note: If you store product images in the database, they will be included in the SQL dump file. If product images are located on the file system, they are not included. To backup such images you need to download them directly from the server. See the section "Storing Image Files" of this manual for more details. Restoring the Database The inverse operation can be performed through the 'Restore database' tab in the same section (Figure 4-2). Two options are available:
Note: The PHP's default maximum allowed uploading file size is 2Mb. This can be changed by modifying the values of 'upload_max_filesize' and 'post_max_size' parameters in the configuration file of your PHP installation (file 'php.ini'). To upload large files, the value of 'post_max_size' must be larger than 'upload_max_filesize'. Additionally, if memory limit is enabled by your configure script, 'memory_limit' also affects file uploading. Generally speaking, 'memory_limit' should be larger than 'post_max_size'.
Important: Restore procedure is irreversible and erases all data tables from your store database. It is highly recommended that you backup your present database data before restoring one of the previous database states from a backup. ![]() Figure 4-2: Restoring the database Since the restore procedure erases all the data in the database including the login history, the store administrator needs to re-login into the Administrator Zone once the procedure is finished. Such behavior is in line with the normal operation logic and is not an indication of a problem of any kind. |