What must be backed up
It is important that both the databases and the program files are backed up.
The databases change most frequently and, in principle, most of the program files can be reinstalled directly from the WordPress site and from the development version of the custom code which I keep on my computer. However all the pictures and files that get uploaded are stored by WordPress amongst the program files. All files uploaded in month mm of year yyyy are stored in a folder called
” /home2/gentsinnyon/wp-content/uploads/yyyy/mm “.
There may be other information stored in the program folders so back up everything just to be sure.
Full Backup Using Wizard
Fortunately HostGator, our web hosting provider, supplies a simple backup wizard. Use it as follows:-
- Log onto HostGator cPanel. Administrators have already been given the password.
- In section entitled “Files” the last item is called “Backup Wizard”, click it.
- A page entitled “Backup Wizard” will appear. It has 2 buttons: “Backup” and “Restore”. Click “Backup”.
- It will now show 2 options: “Full Backup” and “Select Partial Backup”. The text below Full Backup tells us that this is not what we want so we will be using the Partial Backup section.
- Click “MySQL databases”. We will backup the databases first since this is very quick.
- The wizard now lists the 2 databases, they are gentsinn_gin_club_db and gentsinn_wrdp1. The latter is the WordPress database and contains names and contact details of all members. The former contains the calendar and information on who is signed up to which activities.
- Click one of the database names. It will start downloading the backup in a compressed format. Once this is finished, a couple of seconds, click the other name. Once both databases have been downloaded click “Go Back” at the bottom of the screen.
- Now click “Home Directory” under “Select Partial Backup”. This will create a backup of all the program files and will take several minutes. The file created is well over 1 GB long. If the backup is very slow you can leave it and come back later (even overnight). Once the backup is completed you can logout of HostGator cPanel, top right of screen.
- Your Downloads folder should now contain 3 files of type gz. These are compressed files and should be saved. I usually keep about 5 generations of backup on my computer.
Database Only Backups
The backup described above stores everything in compressed format so it is completely unreadable. I like to keep an additional backup of the databases in a readable format in case I need to recreate a single table or something similar.
Do this as follows:-
- Click on the database name in the left panel
Brings up a list of tables in the right panel - At the top of the right panel, click Export
- Click Go
- Do this for each of the 2 databases.
- This downloads a text file containing SQL code which can be used to recreate the database.
- I store this on my own PC along with the compressed downloads described above.