How CodeGuard Restores Work
With CodeGuard, you have the power to decide the type of restoration you would like for your site, be it for a single file, a database, or even the entirety of a website.
Once the restoration process is complete, a backup of the newly implemented changes is created. In addition, the account owner will receive an email notification indicating all the files that have been restored.
This article covers the following topics:
How to Restore Site Files
Restoring a backup version from CodeGuard is extremely simple, regardless of what needs to be restored.
To restore site files:
- Access your CodeGuard dashboard. (Please see the How to Access and Modify CodeGuard article for the instructtions.)
- Locate your domain from the list of website backups.
- Once located, click the Action button on the right-hand side of the domain name.
- Select Restore.
- Locate the date of the backup you wish to restore.
- Next to the backup date, click the Restore Options button.
- You can then choose from the available Restore Options ⤵.
How to Restore a MySQL Database
Did you just suffer a SQL injection or corrupt your database? CodeGuard allows you to restore MySQL databases with just a few clicks.
- Log in to your CodeGuard dashboard. (Please see the How to Access and Modify CodeGuard article for the instructtions.)
- Scroll down to the Other Databases section, then click a database name.
- Under Unassigned Databases, click the Restore tab from the top menu to view restorable backups.
- Locate your database.
- Click the View All Backups button to review all backups made.
- You can then choose from the available Restore Options ⤵.
Restore Options
Full Site Restore
If a site needs a full restoration, CodeGuard can recreate the site files and structure. Before the restoration, CodeGuard uses a pre-restore backup to obtain a copy of the current site as it stands. You can select the version of your site to restore to before the pre-restore backup is run.
After selecting a full site restore, two lists of site content are then created:
- The site version is to be restored
- The current state of the site
The differences between the two lists provide CodeGuard with distinct operations to process files and folders on the site.
The backup is then downloaded, and the version to be restored is prepped for execution as a connection is opened via FTP/SFTP. The folders in the document root are then replaced with those from the restoration.
Individual File Restore
Did a file accidentally get deleted? Have no fear. CodeGuard has you covered! CodeGuard allows individual file restoration without the need for a pre-restore backup. Simply select the file(s) using the type-ahead that will search through the backup versions.
Once the files are selected, they are queued to be downloaded from the site repository, and the connection between the website and CodeGuard will be opened via FTP or SFTP. Upon upload, the restored files will have their permissions set, and the restore will be complete.
Download a Zip File
Optionally, users can download full copies of a CodeGuard backup in a single zip file. This could be done instead of deleting old backups to clean up server space. This option is ideal for those wanting to replace files manually or compare the files to see the differences:
- From the Website Restore Options page, click Select Option under Download Zip.
- You may choose to Download Entire Backup or Download Selected files from the list. If you choose the latter, make sure to put a checkmark on the files you wish to download.
- CodeGuard will begin to compile your files into a .zip, which may take several minutes, depending on its size.
- When your file is ready, refresh the page or follow the steps above to return to it.
- Right-click on the file name and select Save link as... to save the file to your local computer.