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.

Restore home directory when I have sub domains

Discussion in 'General Discussion' started by simmiepam, Sep 28, 2012.

  1. simmiepam

    simmiepam Registered

    Joined:
    Sep 28, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have made some changes to content in my home directory and need to restore it from a full backup that I have on file.

    The problem is I have sub domains in my CPanel file manager and am wondering if I restore the home directory, will that affect any of the folders in the sub domain?

    For instance . . .


    www.mysite.com

    But I also have:
    www.mysite.com/customer1
    www.mysite.com/customer2
    www.mysite.com/customer3

    If I use the restore home directory to get the www.mysite.com back to where it was before I backed it up, will it affect at all any of the content in the sub folders?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, if you restore the backup file, it will restore all of the content from the public_html directory with the content included in the backup file. You may want to manually extract the content from the backup file to a directory outside of the account, and then manually copy over the files that you require.

    Thank you.
     
  3. simmiepam

    simmiepam Registered

    Joined:
    Sep 28, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thank you, my question is IF I use the restore home directory WILL IT affect all the sub directories under it?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. pwhjenny

    pwhjenny Well-Known Member

    Joined:
    Aug 31, 2012
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    If you want to restore home directory but do not want to restore subdomains, you can do some manual work. First take backups of your subdomains manually. If subdomains are large in quantity then you can generate full backup of your account ofcourse, you should not overwrite your existing backup you want to restore you account from. After you generate the full backup, you can restore your home directory and right after that can restore subdomains from the backup taken prior to restore of your home directoy. Hope it makes sense.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    This is not entirely accurate. It depends on how the account is restored. I tested when I discussed restores on this thread:

    http://forums.cpanel.net/f49/whm-backup-restore-questions-287152.html

    The contents were not removed but only added when a restore was done from WHM for an account when using WHM > Backup > Restore Backup area. I specifically state there (and I tested it myself):

    Please test it yourself. Make a server backup using /scripts/cpbackup, add subfolders with contents in the account, then restore the backup in WHM > Backup > Restore Backup area and select either daily, weekly or monthly. It will restore the contents of the /home/username/public_html directory and it will not remove the existing content provided you uncheck all options and simply highlight the username and click "Start Restore" button.

    On my account just now to test it again, I created subdomain1 and happiday folders where one was just a folder and the other was a subdomain. I put files into each folder. I then removed two files in public_html that were in my daily backup performed before I created the folders and subdomain. On the restore, my existing content was still there for the folders and the files I removed were restored.

    Of note, any files you have that already exist and have been changed will revert to the prior file from the backup time. This means you will wipe changed files that existed in the backup. You will not wipe or remove existing folder or file data that isn't in the backup.

    Thanks!
     
Loading...

Share This Page