Restore website files from a backup with JetBackup 5
PrintA file deleted by mistake, a theme edit that broke the layout, a plugin update gone wrong: in most of these cases you can bring the old files back yourself in a few minutes. Open JetBackup 5 in cPanel, go to Home Directory, choose a backup from a date when the site still worked, tick the folders or files you need and start the restore. The steps below show each screen.
Good to know before you restore
- Your hosting account is backed up automatically every 24 to 48 hours. Copies are kept in two separate locations and stay available for 30 days, after which the oldest ones are replaced.
- A restore writes the files from the backup over the current ones. Any change made to those files after the backup date is lost, so pick only what you really need.
- A website is usually files plus a database. For WordPress, Joomla, OpenCart or a shop, restore the database from the same date as well (see restoring a MySQL database), otherwise the files and the content may not match.
- If you only want to look at an older version of a file, use Download instead of Restore: you get a copy on your computer and nothing on the server changes.
Where your sites are stored
The primary domain of the account lives in the public_html folder. Addon domains have their own folder, which may sit inside public_html or directly in your home folder. If you are not sure, open Domains in cPanel and read the Document Root column next to the domain: that is the folder to restore.
Step by step
- Log in to cPanel. In the Files section click JetBackup 5 (you can also type "JetBackup" in the cPanel search box).
- Under Restore & Download, click Home Directory.
- You now see the available backups, newest first, with their date in the Created column. Click the row of a date when the site was still fine.
- In the selected row, click Change Files Selection. By default the whole home folder is selected, which is rarely what you want.
- A Select files window opens at
/backup-root/, which is your home folder as it was on that date. Click a folder name to open it. To see files that start with a dot, such as.htaccess, turn on Show Hidden Files.
- Tick what you need, depending on the case:
- An addon domain site: tick its folder.
- The primary domain site: open
public_htmland tick everything except the folders of other sites stored there.
- One or a few files: open the folder that holds them and tick only those files.
- An addon domain site: tick its folder.
- Click Restore under the list.
- The Restore Summary window lists what is about to be restored. Check it, then click Restore Selected Items. The job goes into the queue.
The Merge option
The summary window has a Merge backup data with live account data box under Restore Options. As its name says, it combines the backup with what is on the server now instead of bringing the selection back exactly as it was. After a hack, leave it unticked so that files added by the attacker do not stay behind. Tick it only if you want to keep files created after the backup date.
Following the job in the Queue
Open Queue from the JetBackup 5 dashboard or the clock icon on the left. Pending means the job is waiting its turn; while it runs, do not edit files or settings in the account. Completed means the files are back. If you see Failed, try a backup from another date; if that fails as well, open a ticket and tell us the date and the folder you tried to restore.
Common mistakes
- Restoring the whole home folder. It also contains your mailboxes and account settings. Restore only the site folder unless you really need everything; for a complete rollback there is a separate guide on restoring the full account.
- Forgetting the cache. If the site still looks the same after a successful restore, clear the cache of your caching plugin (for example LiteSpeed Cache) and of the browser.
- Restoring infected files and stopping there. Clean files from an older date do not close the hole the attacker used. Update the CMS, plugins and themes and change the passwords right away; see what to do when a website has been hacked.
Questions clients ask
Can I restore a file to a different folder?
Not directly from JetBackup. Use Download for that file, then upload it wherever you want with File Manager.
I need a version older than 30 days. Is that possible?
The automatic backups go back 30 days. For anything older you need a copy of your own, which is why we recommend keeping one; see backups in cPanel and how to keep your own copy.
The labels in JetBackup are in Romanian or Russian. Is that normal?
Yes. JetBackup follows the language chosen in cPanel, so the buttons may be translated. Their place on the screen stays the same.