cPanel home directory and database Backups

    The article was added by Mihai T. at 09/28/2008.

  Submit | About | Contact & Privacy Policy

You are here: Articles Directory » Web Hosting

Bookmark and Share

A backup is the copying of important data in case the original data becomes damaged or missing for some reason. Having a recent backup at all times of the data stored in your web hosting account is absolutely critical as it provides you a safety net if something untoward happens. Even if you web host's web server is 100% reliable and never has any problems (which is unlikely to be the case if you have a shared hosting account) there are still many ways in which data in your account could become corrupted or go missing:

• You could accidentally erase or overwrite important files

• Scripts you are using might be or become unstable and damage files

• Your website could be compromised by external forces (spammers, scammers, hackers, and so on), causing data to disappear or be altered

You may also need to refer to old data that you've removed. Even if your web host tells you that they automatically back up the data in your account daily, it is still of the utmost importance that you plan personally to back up your account data regularly. Since, even if your web host will restore their backups of your data, they may not be able to do so quickly enough to save you from protracted downtime. Further, if your host has a problem with their backup of your site you will be out of luck.

Manually downloading all files in your account and using phpMyAdmin or phpPgAdmin to back up your databases would make regular backups quite a painful process. Thankfully, you can download backups and even restore most files with just a few clicks from cPanel.

The various backup options are listed on the left side of this screen. There are four main backup options:

• Full backup

• Home directory backup

• MySQL database backup

• E-mail aliases (forwarders) and filters backup

If you want to be able to restore your account files using cPanel's restore feature then you need to use the home, MySQL, and e-mail aliases and filters backup features. Backing up and restoring files via cPanel does not count against your monthly bandwidth limit, so feel free to do it as often as you need to.

Home Directory Backup

Clicking Download a Home Directory Backup will cause cPanel to compress all the files you see when you log into your account via the main FTP account (including the public_ftp, public_html, and mail directories). Depending on how many files you have in your home directory and how large they are this process can take anywhere from a few second to a minute or more. When the process is complete, you will be prompted to choose a location to save the compressed backup of your home directory on your local computer. The filename of this backup will always be in the format backup-domain.com-MM-DD-YYYY.tar.gz where MM is two digits for the month, DD is two digits for the day, and YYYY is four digits for the year of the backup. This backup gets most of the files in your account, but it does not get mailman mailing lists, databases, or e-mail forwarders or filters (because these are stored outside of your home directory).

Database Backup

At the time of writing, cPanel only makes backups of MySQL databases. cPanel does not yet offer a feature to download or restore PostgreSQL backups yet. You will need to use phpPgAdmin's export feature to back up and restore PostgreSQL databases if you have any. Every MySQL database that you have created will be listed in the MySQL Database Backup section. You will need to click on the name of each database to download them separately. cPanel will compress the database and allow you to download a copy to your local computer with the name DBNAME.gz where DBNAME is the name of the database (it should match the name of the link you clicked on to download the database backup).

E-mail Aliases (Forwarders) and Filters Backup

The table in this section will list your main domain, add-on or parked domain(s) and subdomains. If you've created any e-mail forwarders in cPanel then you will want to click on each link under Aliases where you have created forwarders. The forwarders filename will be aliases-domain.com.gz where domain.com is the domain or subdomain name. If you have created any e-mail filters, you should also click the links under Filters for each domain or subdomain for which you have created e-mail filters. The filters filename will be filters-domain.com.gz.

Clicking on the aliases or filters link for a domain or subdomain that does not have any forwarders or filters set up will create a backup of a mostly empty file. cPanel's restore feature handles these files just fine, but why waste your time downloading empty files? However, if you are unsure if you've created forwarders or filters, download each file to be sure you get everything.

Full Backups

Full backups create a single, compressed file that contains everything from your account, including e-mail, mailman mailing lists, databases, and web content. Full backups, while easy to create and download cannot be restored from within cPanel. You have to manually restore files or ask your web host to restore the compressed full backup file for you.

The drop-down box on this page allows you to set where the compressed full backup will be saved. You have a choice of saving it in your home directory (where you will be able to download it later) or a remote server via FTP (active or passive FTP) or SCP (Secure CoPy similar to SFTP, more secure than FTP). If you want to have your backup sent to a remote server, you need to enter the information below the e-mail address. The remote server is the IP address or host name of the server. The user and password must be a valid user on the remote server. You can also change which port and directory the full backup is saved to, on the remote server. The e-mail address you enter will be sent a message when the backup is complete with the results of the backup (successful or not).

Click Generate Backup to begin the process of backing up your files (which can take anywhere from a few seconds to an hour to finish depending on how big your account is and how busy the server is). If you save your backup to your home directory, it will appear as a link at the top of this page. Clicking the link will start downloading the backup to your local computer. If the backup is not complete, the link will not be clickable and will note that the backup is still in progress.

Restoring Backups

If you have used the separate home directory, MySQL, and e-mail alias and filter backups (rather than the full backup feature), you can also restore these backups from the backup screen in cPanel. There are three separate places to restore the files you've backed up. All three are on the right side of the backup screen.

The first restore field is for home directory backups. Click Browse, select the compressed home directory backup file from your local computer, and click Upload to start the restore process. The file is first uploaded to your home directory and then it is decompressed and all the files restored. During the upload process, you won't see anything happening on your screen. Once the upload is complete and the home directory is being restored the screen will clear and you will see the progress updated regularly. Be patient, the entire process can take a long time if your home directory is large and if you have a dial-up connection to the Internet. Under no circumstances should you stop the restore process once it has begun restoring files, since doing so may render your account unusable. Wait until the process is complete and then click back in your web browser to get back to your cPanel and try the restore again if you need to.

The second restore field is for compressed MySQL database backup files. Like the home directory backup restore process, select one of the MySQL database files you wish to restore and click Upload. Wait until the restore is completed before clicking the back button in your web browser to restore another MySQL database. The final field is to be used for both e-mail forwarder and filter backup files. Select one at a time and click Upload to restore it. Unless you have very complex filters or lots of forwarders set up this restore process should not take long. Click back when done to choose another filter or alias backup file to restore. If you have problems restoring the backups you have, please contact your web host for assistance.

Web Hosting Disclaimer

  • The ArticleCity.info articles directory team is not responsible for falsehoods, inaccuracies, or any other types of misinformation this article may contain and will not be liable for any damage or loss suffered by a user through the user's reliance on the information gained here.
  • ArticleCity.info articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us and we'll investigate the specific article(s) and we will remove the copyrighted material.
Other Web Hosting articles
Understanding how networks work on a basic level - The Basics of Networks Understanding how networks work on a basic level is fairly simple but can quickly become complicated. This is especially true if you are unfamiliar how the technology within different networks functions. From a mecha...
There are many roles that a server can occupy - There are many roles that a server can occupy. For each one there is a unifying similarity: they have to be on a network and have other computers connect to them. In addition to that, these connecting computers have to request something that the s...
Customer Service Leading the Way in Technology - Just the mere mention of the word “internet” can sometimes be very intimidating to people. It's been known to give off the impression that it's to highly technical and confusing for any of us to understand. Unless we've had years of experience, or...
Web hosting requirements at a hosting company - What are the Company's Hosting Policies? Amid all of the marketing material on your potential host's website there is usually some fine print (or worse yet, some things aren't even mentioned publicly) concerning the rules they impose ...
cPanel web hosting account explained - Getting Started with cPanel Now that you have a shiny new cPanel web hosting account, it is time to learn the ropes of cPanel's interface. However, b...
cPanel Interface and general hosting account information - The Main cPanel Interface If you have successfully logged into your account, you should be presented with the main cPanel interface, shown below: ...
cPanel and its general server information explained - General Server Information This is followed by information about the server your account is on: Operating System: This is the operating system that the server your account is on is running. Probably this will be Linux. ...
FTP accounts in your cPanel web hosting account - FTP and cPanel's File Manager It is most likely that one of the first things you will want to do after getting your web hosting account, and taking...
Creating and Managing FTP Accounts under cPanel - Creating and Managing FTP Accounts in cPanel Depending on your hosting plan, you may not be limited to just a single main FTP account. Why would you need more than one? You probably don't if you are the only person wh...
cPanel File manager and File permissions - cPanel's File Manager FTP is not the only way to manage files and directories in your hosting account. cPanel includes a File Manager that will allow you to do almost anything you can via FTP (and a number of things t...