Store
Community Documentation

v3 Knowledgebase

Backup my website

Site Backup

As we mentioned before, it is very important to keep a safe copy of your site, anything goes wrong and you have a safe place where to restore from. Here we will review some of the methods you can use to generate this backup but first lets review each item to backup:

  1. /file folder:

This folder is where all your user's pictures are uploaded to, and I mean all of them. This folder is usually not needed to be backed up but it is your responsibility as a site administrator to determine how important this folder is. You may want to do a full backup once a month and differential or incremental (only new files) backups every Tuesday (for example).

  1. Other site files:

This includes every file and folder that you uploaded to your site except the /file folder of course. Namely /module, /include, /static, /theme, /index.php and /.htaccess You would normally only need to backup these if you have uploaded extensions, languages or plugins, and even so the /static folder rarely changes.

For these past 2 you can run a zip command and download the archive, or if you have a fast connection you can try downloading all to a special folder (although the zip is still recommended). Do make sure that your zip archive works before assuming it does.

  1. Database:

This is a very important aspect of your site, it has the potential of reaching the dozens of GBs with the right traffic, which can also make it difficult to backup. Remember that when you're generating a backup your database is locked, one table at a time. If your database is a MySql you can enable (if you have a dedicated server or a nice hosting company) the binary log which will server as an incremental backup for your database. The MySql site offers a complete guide on backing up, far more complete than what we could mention here. They talk about external tools like mysqlhostcopy and mysqldump, Phpfox includes a tool in the AdminCP to use mysqldump to generate a database full backup, it does not provide any configuration features but for a once in a while backup it should work.

In any case, do remember that your hosting company is the one who set up your server, they are the ones who know how it works best and they are the experts at backing up. Do not hesitate to contact them about the options available for you.

As a side note, if you have a CPanel back end you also most likely have a feature called "Full Backup" which is of course a files and database backup (email accounts, subdomains, etc...). And if you have phpmyadmin it also issues a mysqldump to generate the backup. We mention this because mysqldump is not a perfect solution to backing up and sometimes it could face problems which you need to know about.