The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need to restore a site backup to a subdomain

Discussion in 'General Discussion' started by won1one, Nov 8, 2009.

  1. won1one

    won1one Registered

    Joined:
    Nov 8, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  2. cPanelGregK

    cPanelGregK Administrator
    Staff Member

    Joined:
    Sep 8, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    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
     
  4. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Solution

    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.
     
  5. jrianto

    jrianto Active Member

    Joined:
    Jun 9, 2008
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
Loading...

Share This Page