1. Home
  2. Other Security Support
  3. CodeGuard
  4. How to Restore Your Site With CodeGuard

How to Restore Your Site With CodeGuard

You are finally ready to restore! You can restore your site back to any version you have previously saved.

FTP/SFTP Restore the whole site.

Restoring your site with FTP or SFTP can be a bit time consuming, as it requires a backup before you restore the site. The backup is necessary to get the actual current state of the site, as things may have changed drastically since your last backup. FTP/SFTP Restore the whole site.

Steps to Restore Entire Site:

  1. Select the version you want to restore.
  2. The normal backup process will run.
  3. There will be two lists of your site content built: a version to be restored, and the site’s current version.
  4. The differences between those two sites produce the discrete operations for folders and files. Those items will be placed in a queue for processing.
  5. The backup will download (if it does not exist yet) and the version to be restored will be checked out.
  6. Open a connection to the host site.
  7. Process the operations queue and log the results of it all in this specific order:
    1. Delete files.
    2. Delete folders.
    3. Create folders.
    4. Upload files.
    5. Change file permission.
  8. Record the restore statistics.
  9. Send out the email notifications.

FTP/SFTP Restore individual files.

You can restore individual files without a pre-restore backup. To select the individual files, you can use a typeahead that searches the files for any particular back up version.

Steps to restore individual files: 

  1. Select 1 – n files in the UI, those are added directly to the operations queue.
  2. The site repo is downloaded and the version that has the previously selected files is checked out.
  3. The connection will be tested and opened while using the right client (FTP/SFTP)
  4. The selected files will be uploaded, and their permissions will be set.
  5. Record the restore statistics.
  6. Send out the email notifications.

MySQL/MS-SQL Restore of the Database

This process will use the MySQL or MS-SQL client to do the restore.

Steps to restore with MySQL or MS-SQL:

  1. A pre-restore backup will be performed
  2. Download repo from S3
  3. Target the restore version
  4. Open the connection to remote database while using MySQL directly or you can use an SSH tunnel, or even MS-SQL.
  5. Do the database backup file.
  6. Drop and recreate each table
  7. Import table data.
  8. Record the restore statistics.
Updated on

Was this article helpful?

Related Articles