Restore website files in cPanel
In this article I'm going to show you how to restore a partial home directory backup in cPanel. This will allow you to restore your account's website and email files to a previous date when you last made a website backup.
This is good knowledge to have, so in case you've accidentally removed some files from your website, or deleted an important email, you can get those lost files back. It's also handy to backup website files prior to upgrading software that runs your website, so that if anything goes wrong you can at least revert to the working old version again.
When you restore a partial home directory backup like we're creating covering below, this is going to overwrite any existing files currently on your account. So if you have a /public_html/index.htm file on your account, and the backup you created also has that file, the file from the backup will be restored over the current live file.
If you have a new file such as /public_html/index2.htm live on your website that didn't exist in the backup, or you've gotten new emails since you made your partial home directory backup, these files will not be overwritten during the restore.
Restore home directory backup in cPanel
Following the steps below you can learn how to restore a partial backup of your website including all the files in your home directory.
- Login to your cPanel.
- Under the files section, click on Backups.
- Under Restore a Home Directory Backup, click on Choose File.
Next in the file browser pop-up, find your home directory backup file, click on it, then click on Open.
- The name of your backup should now be displayed, so click on Upload.
- You should then see the progress of your files being restored.
You should now know how to restore your website files from a partial home directory backup in cPanel that you've previously made.
You will also want to read my articles on how to backup your database in cPanel, and restore your database in cPanel to get a better understanding of how cPanel handles restoring the different parts of your website.
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
2013-07-04 8:09 am
Hi, I get the message Restoring Files but nothing else is happening. How long should it take for the process to complete?
2013-07-05 12:10 pm
If you only have a few files, the restoration could take just a few seconds. If however you have lots of files, such as a few GB worth of files, it may take longer for the restoration to finish.
How large is the backup file that you're working with? Let us know if anything has changed since you posted your comment.
2014-04-01 2:41 pm
My backfile size was around 7GB and it is at the "Restoring homedir..." stage...It has been a few hours, however, I still see it going.
If I close the browser the window, will it cancel the restore process?
2014-04-01 2:54 pm
The restore process can take quite a while if you have a rather large backup like yourself. If it seems to be still making progress then it should still be restoring to the server. Unfortunately I couldn't find your account on file with us based off this post to double-check on the current status of the restore.
Closing the browser window should cancel the restore process, so if you wanted it to complete you would want to keep the browser window open until it's completely finished.
Please let us know if you had any other questions at all.
2014-04-01 3:05 pm
Thank you for your response Jacob. I personally don't have an account here, but a few of my clients do.
When I do full backup through cPanel, the browser window can be closed and the proces still completes. It kind of does not make sense to me why WHM does not allow this, especially when the process is longer than the backup itself. I am assuming security reasons.
I have Chrome launched now and I am kidn of nervous now that it has taken this long would hate for it crash. So will minimize this and use Firefox for the time being...
Thank you again for your response!
2014-04-01 5:16 pm
Hello Serkan, thanks for the input.
I went ahead and tested this out, and it actually does look like the restore process will continue to complete, like you mentioned for the backup process. This is so long as you've reached the Restoring files... part of the restore process in cPanel.
If your web-browser is still showing Uploading (99%)... at the bottom status bar, and you close the web-browser it will cancel the restore process as the full backup doesn't get uploaded.
If you're worried about the restore process stalling out on you, one simple way to check on the status would be to upload a PHP script to the /public_html directory of the account you're restoring like this:
If you then accessed that script in another web-browser tab, it would output like this:
Showing there are 18 files totaling 123MB in the /public_html directory. If you refresh that file every so often you should see either the file count, or size go up.
2014-04-17 6:22 pm
After I had to do a full site restore through Inmotion yesterday, I am looking into backups more thoroughly. To be honest, I though Inmotion handled all of this for me, but now I realize that it doesn't backup the database files that my Wordpress plugins use. Or to be more clear it apparently backs them up but if they do a restore from the format they use, it will corrupt the site. So the backup of the database from Inmotion really isn't useful if you need a site restore.
I had a look at the article on backing up the database files, and from what I'm understanding, I can do a restore of those files if needed in the future, even though I'm storing them locally.
My question is ... on the cPanel, it says here's a button for a full site backup ... then it says .... oh but you can't use this for a site restore, only to transfer to a new server. Why is this? If I can store a copy myself and then restore it myself, would this have not saved me the hassle of waiting all day for Inmotion to do a full restore?
Am I reading this all correctly?
Basically I want a full procedure of what I should be doing as a site owner to ensure I have all of my site backed up and ready to restore in the event of an emergency.
One more question - if I pay more for a higher level of service, can all of this just be done for me?
Post a Comment
Do you want to publish a tutorial to our support center?