Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2008
    Posts
    10

    Default How to recover a deleted account

    Hello,
    I need to restore/recover an account that was accidentally deleted/terminated. I don't have a cpmove tarball to restore from; all I have are backups (R1Soft) of the data. Can someone give me a list of all the files/directories that I need to restore so everything works again (ie DNS, MySQL, Cron jobs, additional domains, subdomains, etc)? I'm very grateful.
    Thanks,
    Paul

  2. #2
    Member WebScHoLaR's Avatar
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    504

    Default

    First create a fresh account with the same username and domain name from the server so that entries will be added to required files. Here are the directories that you need to restore the following with OVERRIDE option checked in R1soft:

    /home/username
    /var/cpanel/users/username
    /var/cpanel/userdata/username
    /var/lib/mysql/username* (Restore the databases)

    DNS zone files need to be restored too from /var/named/ but the entry in /etc/named.conf need to be added again or you can just add new dns entries/zones.

    Once you restore all these, you may need to correct ownership and rebuild files:

    chown -Rvh useranme.username username
    chgrp -v nobody /home/username/public_html
    chgrp -v mail etc mail
    /scripts/updateuserdomains
    /usr/local/cpanel/bin/build_apache_conf
    /scripts/restartsrv httpd

    Regards,
    WebScHoLaR

    WebHosting Blog: http://WebScHoLaR.net

  3. #3
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,093
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    We have the cpanel hook script /scripts/prekillacct created, which does a backup of the account just before deleting it.

    That way, if you delete an account accidentally, you still have a copy of the account which you can restore.

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2008
    Posts
    10

    Default

    Thank you both. Your comments were very helpful.

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Dec 2008
    Posts
    10

    Default

    For future reference, add /var/spool/cron/username to the list of files that need to be restored. This file will only exist if the user has created cron jobs.

Similar Threads & Tags
Similar threads

  1. How do i recover terminated account
    By kevinbernard31 in forum New User Questions
    Replies: 1
    Last Post: 12-29-2009, 02:07 PM
  2. recover terminated account
    By carperman in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-21-2006, 06:29 AM
  3. How to recover deleted DNS zone?
    By kaito in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 03-10-2006, 09:43 AM
  4. Deleted Database - Any way to recover?
    By neenach2002 in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-23-2005, 09:59 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube