Making a Backup in cPanel
Restoring From Backup
To restore a full backup created from a cPanel server you must transfer the archive file to the server you want to retore it to and save it in the /home folder. Transferring this file is best done via SCP, if your transferring from server to server and have access to the ssh interface for both servers you can use the command line scp command like this on the server you backed up:
#scp filename user@ipaddress:/home
If you do not have ssh access to both servers you should use your FTP credentials to move the file from the server you backed up to the new server or to your desktop for transfer to the new server via WinSCP (See article titled "Uploading Content to Your Server"). Or you can use file manager in cPanel to move the file to the public_html directory of your website (/home/cpanel_username/public_html) and download it using your browser at http://website_name/backup_filename or via wget on the server you are transferring the data to with wget http://website_name/backup_filename. Ensure your present working directory is appropriate for the download. The restorepkg script will search for the archive file in the following locations:
Once the archive file is fully transferred and located in /home, login to the server you are restoring the account to via ssh (see article "Getting Conencted to Your Server"), and run this series of commands:
**Please note that if you already created the user account you are trying to restore this method will fail with errors and corrupt data you may have already uploaded or created. To bypass this error and destroy all data on the previously created account use the --force switch before the username (/scripts/restorepkg --force username).
Configure Changes for cPanel
After the restore is compelted your website should be viewable. However there are some errors you may see instead. Here are some common items that may need to be reconfigured to bring your site online:
1. If you receive a database related error such as:
Error establishing a database connection
Warning: mysql_connect(): Access denied for user: 'db_username@localhost' (Using password: YES) in /home/username/public_html/includes/db.php on line 19
This means is that your website cannot communicate with your database due to user account credentials. You need to assign a database username and reconfigure your website's database settings.
The user has now been added, but it has not been assigned to a database.
Now you need to locate your database configuration file.
It is time to reconfigure your website's database settings.
1. Go to the configuration file and choose to Edit.
2. Look in the code for a place where your database name is defined. Here is the example of what we see:
3. The database name is very important; it must have your new cPanel name in the first part. Update the part before the underscore, but change nothing after the underscore.
4. Next, get the database username and password you set aside and replace the ones in the file.
5. Save the file and you are done! Refresh your webpage to see if it works.
It is not uncommon that some configuration changes may be required to database configuration file. Here is a short list of some common database applications that may need some changes and their associated configuration files:
- 0 Users Found This Useful
Hello Sometime I'm asked buy x3host Hosting why my cPanel client can't verify the cPanel host...
1. Create 16x16 PNG favicon file and place it in WHMCS template folder. (e.g....
Hi guys,We are going today to explain how to point our ips with your custom nameservers through...
Here's How Zamfoo Root / Alpha / Master / Super Alpha Looks Like! Surprise!If you are a visitor...
Hi,We are going today to explain How to grant account with Master Reseller Rights Using ZAMFOO...