Backing up your site using Sftpftp and cPanel

Now that we have completed our initial investigation of the best practice methods for maintaining and monitoring our new Drupal 6.13 site, it's a good idea to run a full backup of the site directory (all of our Drupal files and folders), and of the database. We did this in Chapter 1 before we completed our initial Drupal 5.x upgrade, but we're now going to look at this in more detail. Backups are essential to keep our site performing well over time. Eventually, you may run into an issue or glitch in your site or database, which will cause you to be forced to restore some of your Drupal core or module files and restore your Drupal database. You may never need to resort to a backup, but it's a requirement to have a backup in case you do need it because issues and errors in your site and database can come up unexpectedly.

The first method is to run a backup of all of your Drupal files and folders. One method of doing this is through SFTP. Connect to your site using an SFTP client and then copy all of your folders and files back to your local desktop or local server/sandbox environment. Be sure to run this backup through secure FTP, if your host gives you access to an SFTP client or connection. This will minimize the risk of having your data comprised as it is being transferred via FTP. This is the method of backup we ran in Chapter 1.

Another method of creating a backup of your site and/or server is to use a tool that your cPanel may provide. Utilities, such as cPanel, often provide a backup interface that you can use to create a full backup of your site's home directory or public_html directory. You can then save this backup to another directory on your server and restore from this directory if necessary. The benefit of doing a backup using this method is that it's potentially more secure than your SFTP method, as the data is staying on your remote server. Here are the steps:

1. Login to your cPanel.

2. Locate the Backups icon/button usually under a section titled Files or File Management. Click on that icon.

3. This will launch a page that will give you options to download either a Full Backup (all of your site directories, databases, and e-mail forwarders and filters), or a specific Home Directory Backup, which will include all the site directories in the home directory of your web server.

4. You can also download backups of your MySQL databases through this admin page. Click on the links to the database in question to download its backup. For example, here we'll click on the link to the variantc_drup5 database.

Opening drup5.sqL.gz

Opening drup5.sqL.gz

5. You can also restore your home directory backup and your MySQL databases from this page.

You can also use the Backup wizard option through cPanel, if your cPanel provides this. It's basically the same functionality as described above with the Backups utility, but this walks you through the steps, one at a time, in wizard workflow format. The wizard asks you if you want to Backup/Restore or Restore. Then you click and follow the steps. If you select a Backup, it will then prompt you for whether you want to do a Full Backup or a Partial Backup.

cPanel I ^oma'n 1 upgrades Postini Manager | |

I Dedicated] SSL j Profile/ ] IP 1 Certificates! Billing

Checkout 1

Backup Wizard



. zFull or Partial Backup


This feature allows you to download a zipped copy of your entire site or parts of it onto your computer.

host onster

This feature allows you to download a zipped copy of your entire site or parts of it onto your computer.

The following are backed up and included in a zip file for your convenience:

Home Directory MySQL Databases Email forwarders configuration Email filters configuration

Backup -

This feature allows you to restore parts of your cPanel by uploading your partial backup zip file(s) that you downloaded from the backup feature.

The following can be restored:

Home Directory MySQL Databases Email forwarders configuration Email filters configuration

Was this article helpful?

0 0

Post a comment