Please Login or Register

Knowledgebase

Backing up and Restoring with File Manager and phpMyAdmin

Keeping regular backups of your site files and databases is one of the most important ways to protect yourself from having your site go down after an unwanted intrusion. The other is keeping your site software up to date with the most recent versions, i.e., custom scripts and content management systems software.

While you can use cPanel's built in backup feature, restoring from that type of backup is more complicated since it involves restoring your site through cPanel.

A better way to make incremental backups that you can use to quickly revert to if necessary when doing site work or updates is to tar and zip your files using cPanel's File Manager application.

Backup Your Site Files Using File Manager and phpMyAdmin

1. Login to your hosting cPanel.

2. Scroll to the Files section and click on the File Manager icon link to launch it and open the web root (public_html).

3. You should see all of the files in the public_html directory. Above the directory listing, click on the Select All link to select all of the files. Scroll down and deselect (Windows: Control + Click; Mac: Command + Click) any files or directories that aren't a part of your site, i.e., previous backup files, subdomain directories (if you are using them), etc.

4. Click on the Compress icon link and select the GZiped Tar Archive format and - keeping the /public_html/ part of the path intact, since that is what tells File Manager where to save the file to - give the new file a meaningful filename, i.e., mysitename_bak_mmddyy.tar.gz.

5. Click on the Compress File(s) button to finish. Download the newly created backup file to your local hard drive and delete it off of the server to conserve storage space.

Next, backup your MySQL database for the site by using phpMyAdmin database utility.

1. Go back to your cPanel and scroll to the Database section and launch the phpMyAdmin database utility.

5. Click on your site's database name from the list in the left column. It will display in the main area.

6. Click on the Export tab, click the Custom radio button, and then click on the Select All text link, just in case all of the tables in the table list area are not already selected. Under the Output section, make sure that the Save Output to a File option is selected. Scroll down to the Format-Specific Options section and the to the Object Creation Options subsection. Under Add Statements, click on the Add DROP TABLE/VIEW/PROCEDURE/FUNCTION Statement. Next, scroll down and click on the Go button to finish, and save it to your hard drive if prompted.

Restoring Your Site From Your File Manager/phpMyAdmin Backup

1. Login to cPanel and scroll to the Files section and click on File Manager to launch it.

2. Select all of the site files which are in your GZiped Tar Archive (if you can't rememer what files were in it, you can doubleclick on it on your hard drive to decompress it and view its contents). After selecting all of the files you want to delete, click the Delete link to remove them.

3. Upload your backed up GZiped Tar Archive backup file to the public_html directory. Click on its folder icon to select it and then click on the Uncompress icon link to expand the file and its contents into the public_html directory.

4. Go back to your cPanel and scroll to the Database section and launch the phpMyAdmin database utility.

5. Click on your site's database from the list in the left column. It will display in the main area.

6. Scroll to the bottom and click on the Check All text box to select all of the database's tables. Then in the With selected drop-down menu, select the Drop option. Then click the Go button to delete all current tables in the database.

7. Scroll to the top and click on the Import tab to make it active. Under File to Import browse your computer and locate and select the backup MySQL database file you wish to restore from. Click the Go button to load the backup file into your selected database.

8. Visit your site in a new browser window or tab to make sure it is connecting to the database and functioning correctly.

Congratulations, you have successfully restored your site from your backup files!



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read

Quick Navigation

Client Login

Email

Password

Remember Me

Search



Follow Us on Twitter