Skip to main content

How to Restore a File or Directory From a WHM Backup

You can restore specific files or directories from a server-level backup using WHM. This process allows a server administrator to recover data for any cPanel account on the server from a previously created backup.

You can restore specific files or directories from a server-level backup using WHM. This process allows a server administrator to recover data for any cPanel account on the server from a previously created backup.

Before you begin

You will need:

  • Server Administrator access to WHM

  • A valid WHM backup file (e.g., a .tar or .gz file)

  • The specific file path or directory path you wish to restore

Restore a file or directory from a backup

  1. Log in to WHM.

  2. Navigate to Home > Restore > Restore a File or Directory from a WHM Backup.

  3. Select the backup file from the list of available backups.

  4. Enter the full path of the file or directory you want to restore. Use the format /home/username/path/to/file or /home/username/path/to/directory.

  5. Select the destination path where the file or directory should be placed.

  6. Click Restore.

Confirm the result

  • The system will display a success message once the restoration is complete.

  • You can verify the restoration by navigating to the directory via the command line or by logging into the affected cPanel account and checking the file manager.

If the file path is not found

Ensure that the path provided is the absolute path starting from the root directory. For example, if you are restoring a file for a user named exampleuser, the path must include the /home/exampleuser/ prefix.

Limitations

  • This process restores files from a server-level backup. It does not restore data from a local cPanel account backup unless that backup has been uploaded to the server and is available in the WHM selection list.

  • Restoring a directory will overwrite any files in the destination path that share the same name as the files in the backup.

Did this answer your question?