Need to restore a site backup to a subdomain

won1one

Registered
Nov 8, 2009
1
0
51
I have a tar.gz backup file of my old website from a different webhost than my current site.

I want to integrate the old website into my new site by restoring the backup file to a subdomain on my current site.

I do not want to overwrite my current site.

How can I accomplish this?

Thanks.
 

cPanelGregK

Guest
Sep 8, 2006
14
0
226
If the username doesn't already exist on this server, you can restore the backup, then change the domain via "Modify an Account". Otherwise you may need to extract the backup, then copy over your content manually & restore databases, etc.
 

Infopro

Well-Known Member
May 20, 2003
17,090
519
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
If the username doesn't already exist on this server, you can restore the backup, then change the domain via "Modify an Account". Otherwise you may need to extract the backup, then copy over your content manually & restore databases, etc.
I agree with Greg here. Your best bet might be to create the subdomain first from your cPanel and then restore files manually.

Unpack that backup file and get into the directory of files you want to use again. Once inside, highlite all files and folders that you wish to restore, right click and select add to (whateverthedirectoryiscalled.zip) provided you have winzip here of course.
Now upload that compressed directory to the subdomain directory at public_html/subdomain/
Extract the file using cPanel's File Manager, then delete or move out the whateverthedirectoryiscalled.zip file you uploaded.

As one way to go here. :p
 

linux7802

Well-Known Member
Dec 14, 2007
232
1
68
cPanel Access Level
Root Administrator
Solution

I have a tar.gz backup file of my old website from a different webhost than my current site.

I want to integrate the old website into my new site by restoring the backup file to a subdomain on my current site.

I do not want to overwrite my current site.

How can I accomplish this?

Thanks.
As you mentioned you don't want to overwrite the current content in that case I like to recommend you to follow the steps one by one

First create new directory under the subdomian

Second upload the tar backup file in newly created subdomain directory

Third untar the backup file

Fourth move the files from newly created directory to subdomain main directory which you want to host under your subdomain

And if you are also having database backup then you need to create the database name and user name from your cPanel > mysql database and restore the database backup file in newly created database as well as you also need to change the database name and user name in configuration file.
 

jrianto

Active Member
Jun 9, 2008
44
0
56
I don't think you can restore a cPanel backup to a "sub domain". When you perform a restore, it actually creates a new cPanel account in your new web host exactly as it was before from your previous web host.

The way to do it is to restore it manually by not preforming a full backup, but just the home directory and databases.