Restoring Files From a Backup

Knowing how to properly restore files from a backup is just as important as creating the backup itself. This guide will walk you through the process of restoring your website files from various types of backups on your dotCanada.com hosting account.

Before You Begin

Before restoring files from a backup, consider these important points:

  • Identify what needs to be restored: Determine whether you need to restore specific files or your entire website
  • Check backup integrity: Verify that your backup file is not corrupted
  • Create a current backup: Before restoring, back up your current files in case you need to revert
  • Plan for downtime: Large restores may cause temporary website unavailability

Restoring Files Using cPanel's Backup Wizard

Method 1: Restoring from a Full Home Directory Backup

  1. Log in to your cPanel account at https://{hostname}.mysecureservers.com:2087
  2. In the search box at the top, type "Backup" or navigate to the FILES section
  3. Click on Backup Wizard
  4. Click Restore to access the restoration options
  5. Select Home Directory Backup as the backup type to restore
  6. You'll be prompted to upload your backup file:
    • Click Choose File and locate the backup file on your computer
    • Select the file and click Open
  7. Click Upload to begin the upload process
  8. Once the file is uploaded, cPanel will extract and process it
  9. Follow the on-screen instructions to complete the restoration
  10. When the process is complete, you'll see a confirmation message
Important: Restoring a full home directory backup will replace ALL existing files in your account. Any changes made after the backup was created will be lost.

Restoring Files Using File Manager

Method 2: Uploading and Extracting a Backup Archive

This method is best for restoring specific files or directories:

  1. Log in to cPanel
  2. Open File Manager
  3. Navigate to the directory where you want to restore files
  4. Click Upload in the top toolbar
  5. Click Select File and choose your backup archive (ZIP, TAR, etc.) from your computer
  6. Once the upload completes, return to File Manager
  7. Locate and select the uploaded backup file
  8. Click Extract in the top toolbar
  9. Specify the extraction path (typically the current directory or a specific subdirectory)
  10. Click Extract File(s) to begin extraction
  11. The files will be restored to the specified location

Method 3: Selective File Restoration

To restore only specific files from a backup archive:

  1. Upload the backup archive as described in Method 2
  2. Select the archive file
  3. Click View to browse the contents of the archive
  4. Navigate through the archive and select the specific files or folders you want to restore
  5. Click Extract in the top toolbar
  6. Specify the extraction path where you want the files to be restored
  7. Click Extract File(s)
  8. Only the selected files will be extracted to the specified location

Restoring Files Using FTP

For larger backups or if you prefer using FTP:

  1. Extract the backup archive on your local computer
  2. Connect to your website using an FTP client (like FileZilla or Cyberduck)
  3. Navigate to the directory where you want to restore the files
  4. Upload the extracted files from your computer to the server:
    • For a complete restoration, upload to the root directory
    • For partial restoration, upload to the specific directory needed
  5. If prompted about overwriting existing files, confirm that you want to replace them
  6. Wait for the upload to complete
Pro Tip: When restoring large sites via FTP, you can right-click on a folder and select "Upload" instead of dragging and dropping. This allows you to upload entire directories at once, preserving the folder structure.

Restoring from JetBackup (If Available on Your Account)

If your hosting plan includes JetBackup:

  1. Log in to cPanel
  2. Search for "JetBackup" or find it in the BACKUP section
  3. Click on JetBackup
  4. Go to the "Backups" tab to see your available backups
  5. Find the backup you want to restore from and click Manage
  6. You'll see options to restore the entire backup or specific elements
  7. To restore website files, select the "Home" or "Home Directory" option
  8. Choose whether to restore all files or select specific files/directories
  9. Click Restore to begin the process
  10. JetBackup will process the restoration and provide status updates

Restoring Specific Content Management Systems

To restore a WordPress site from a backup:

  1. Restore the files:
    • Upload and extract your WordPress files backup to the root directory (usually public_html)
    • Key folders to restore: wp-content (contains themes, plugins, and uploads)
    • Important file to restore: wp-config.php (contains database connection information)
  2. Restore the database:
    • If you have a database backup, you'll need to restore it separately
    • This is typically done using phpMyAdmin (see our separate guide on database restoration)
  3. Verify file permissions:
    • WordPress directories should typically be set to 755
    • WordPress files should typically be set to 644
    • wp-config.php should be set to 600 for additional security
  4. Test the restoration:
    • Visit your website to verify it loads correctly
    • Check if images and other media are displaying properly
    • Test functionality like forms, search, and user logins

To restore a Joomla site from a backup:

  1. Restore the files:
    • Upload and extract your Joomla files backup to the root directory
    • Ensure you restore the configuration.php file, which contains your site settings
  2. Restore the database:
    • Use phpMyAdmin to restore your Joomla database backup
  3. Verify file permissions:
    • Joomla directories should typically be set to 755
    • Joomla files should typically be set to 644
    • configuration.php should be set to 600 for security
  4. Clear the cache:
    • Log in to your Joomla admin panel
    • Go to System > Clear Cache
    • Select all cache groups and click "Delete"

To restore a Drupal site from a backup:

  1. Restore the files:
    • Upload and extract your Drupal files backup to the root directory
    • Ensure you restore the sites directory, which contains your settings
    • The settings.php file contains your database connection information
  2. Restore the database:
    • Use phpMyAdmin to restore your Drupal database backup
  3. Verify file permissions:
    • Drupal directories should typically be set to 755
    • Drupal files should typically be set to 644
    • settings.php should be set to 600 for security
  4. Clear the cache:
    • Log in to your Drupal admin panel
    • Go to Configuration > Development > Performance
    • Click "Clear all caches"

Post-Restoration Steps

After restoring your files, take these important steps:

  1. Verify file permissions: Check that the restored files have the correct permissions
  2. Test your website: Thoroughly check that all functionality is working properly
  3. Check for missing content: Verify that all pages, images, and other content appear correctly
  4. Update configuration if needed: If restoring to a different server or domain, you may need to update configuration files
  5. Clear cache: Clear your browser cache and any CMS or server caches

Troubleshooting Restoration Issues

Missing Files After Restoration

If some files appear to be missing after restoration:

  • Check if the files were included in the original backup
  • Verify that the extraction process completed successfully
  • Check if the files are in a different location than expected
  • Look for extraction errors in the cPanel error logs

Website Not Working After Restoration

If your website doesn't function properly after restoration:

  • Check error logs: Review your website's error logs for specific issues
  • Verify database connectivity: Ensure database connection details in configuration files are correct
  • Check file permissions: Incorrect permissions can prevent scripts from executing
  • Look for path issues: If restoring to a different location, paths in configuration files may need updating

Extraction Errors

If you encounter errors during extraction:

  • Check if the backup file is corrupted or incomplete
  • Verify you have sufficient disk space for the extraction
  • Try extracting the backup on your local computer and then uploading the files via FTP
  • If using a ZIP file, try using a different archiving format like TAR or GZ
Pro Tip: For large or complex websites, consider doing a staged restoration to a subdomain or development environment first. This allows you to test the restored site before replacing your live website.
Important: If you're restoring a site that was compromised or hacked, make sure to scan the backup files for malware before restoration to avoid reintroducing security issues.

If you need assistance with restoring your website from a backup, please contact our support team.

Was this answer helpful? 0 Users Found This Useful (0 Votes)