Results 1 to 16 of 16

Hybrid View

  1. #1

    Want to tarball my website files and restore with WHM - Please help...

    I have moved the server and server accounts are now in the new server but my websites files are in /restore/home and the databases are in /restore/var/lib/mysql


    I am little confused and looking for someone's guidance on tarballing the whole files with database of each accounts and to be restored in my new server through WHM. Can anyone show me the right path to do this?


    I am in urgent need of this so anybody could help on this I would be greatful to them.

  2. #2
    Hello,

    If your old server is accessible now, you could use the "Copy multiple accounts" option in the new server's WHM to transfer all the accounts from the old server to the new server. Otherwise, you could make tar.gz backup of your accounts using /scripts/pkgacct. Then you could copy these backup files to the new server's home directory(/home) using scp or rsync. Then ssh to the new server and run "/script/restorepkg accountname" to restore the accounts in the new server.

  3. #3
    I have no access to my old server.

  4. #4
    If you have no access to the old server, the account cannot be restored easily. Don't you have the backups of /var/named, /usr/local/apache/conf, /var/cpanel and some other important directories? Do you have root access to the new server?

    Anyway you could try the following steps at your own risk:
    1. Copy the contents of /restore/home/* to /home.
    rsync -vrplogDtH /restore/home/* /home

    2. Copy all folders in /restore/var/lib/mysql to /var/lib/mysql
    rsync -vrplogDtH /restore/var/lib/mysql /var/lib

    These steps are not complete as you haven't provided enough details.

  5. #5
    Yes I have all those backups of /var/named, /usr/local/apache/conf, /var/cpanel and some other important directories? in /restore

    So please give me the correct command to put all those important directories in correct place. I don't want to take the risk so please give the correct command.

  6. #6
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    3,262
    Quote Originally Posted by mharrisr View Post
    Yes I have all those backups of /var/named, /usr/local/apache/conf, /var/cpanel and some other important directories? in /restore

    So please give me the correct command to put all those important directories in correct place. I don't want to take the risk so please give the correct command.
    You don't need to take backups of those directories if you take account backups. Chances are you haven't made significant changes to named and apache conf.

    Simply take a backup of all cPanel accounts and move them to the new server.

    Best
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    Server Management - Unlimited Servers. Unlimited Requests. One Plan!
    cPanel Varnish Plugin -- Seamless SSL Caching (Let's Encrypt, AutoSSL, etc)
    Slow Site or Server? Unable to handle traffic? Same day performance fix: joe@unixy

  7. #7
    Quote Originally Posted by UNIXy View Post
    You don't need to take backups of those directories if you take account backups. Chances are you haven't made significant changes to named and apache conf.

    Simply take a backup of all cPanel accounts and move them to the new server.

    Best
    where is the cPanel accounts?

  8. #8
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    3,262
    Quote Originally Posted by mharrisr View Post
    I have moved the server and server accounts are now in the new server but my websites files are in /restore/home and the databases are in /restore/var/lib/mysql


    I am little confused and looking for someone's guidance on tarballing the whole files with database of each accounts and to be restored in my new server through WHM. Can anyone show me the right path to do this?


    I am in urgent need of this so anybody could help on this I would be greatful to them.
    Were you able to transfer the accounts? Let me know if you need a hand.

    Regards
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    Server Management - Unlimited Servers. Unlimited Requests. One Plan!
    cPanel Varnish Plugin -- Seamless SSL Caching (Let's Encrypt, AutoSSL, etc)
    Slow Site or Server? Unable to handle traffic? Same day performance fix: joe@unixy

  9. #9
    Join Date
    Jun 2009
    Posts
    5
    If you have access to your old server then you can copy cpanel accounts using the whm migrate account functions.

    However, if you do not have access to old server and have limited access to certain data then the migration will need to be done manually.

    Few important files here are httpd.conf, named.conf, /etc/localdomains, /etc/userdomains and various folders such as /var/lib/mysql, /var/named, /usr/local/cpanel, etc.

    I would suggest you to ellaborate in depth about the backup of data that you have. If you are not sure, then I would suggest you to hire a system admin rather than playing with the server.

  10. #10
    Join Date
    Mar 2009
    Location
    Chicago, IL
    Posts
    219
    Since you don't have access to your old server, Your options are fairly limited here. It really depends on exactly *what* you managed to backup prior to losing the old host.

    Option 1: If you look in /scripts/cpbackup, you'll find a list of accounts *necessary* for a full server restoration. If you want a bit of help with sorting that list out, just reply to this thread and let me know.

    If you have all of the necessary files and directories, it's pretty simple. You do a fresh installation of cPanel, overwrite the existing copies with your old ones and then do a big upcp --force which will fix up just about everything necessary.

    However I need to REALLY stress that if you don't have all of the necessary components, this will break things in a very ugly fashion.

    Option 2. You're going to need to recreate the cPanel accounts, email boxes, etc by hand and then do a big restoration of /home/. Once that's done, you'll need to go through and hunt down permissions and slowly fix things up after that. It's not going to be easy, but at least you have the data necessary to redo this.

    As to the MySQL DBs, I'd strongly suggest doing an initial full mysqldump 'mysqldump -u root -A >fullbackup.sql' as this gives you a recovery point. After that, you can move the databases back into /var/lib/mysql/ and hope for the best. However since you changed IPs, you're going to need to keep an eye out for anyone that had remote database access setup. Anyone referring to 127.0.0.1/localhost in their configs should be fine. (this also assumes roughly the same version of MySQL) If it's differing versions, you're going to have to add the databases themselves manually and then start setting username/password permissions yourself by hand.

    I'm sorry I don't have a better answer for you here, but there's probably not an easy way to restore this given the data that you have. It's going to be piece by piece and require quite a bit of work to get everything fully working again I believe.

    I wish you luck, and if we can be of assistance here on the forums, just let us know.

  11. #11
    When I try with /scripts/cpbackup it says Backup is not done today as per whm...
    Yes I have all the necessary files and directories from old server at /restore. A good thing is I have successfully restored only one account after a long struggle after moving all cpanel user accounts to /var/cpanel/users and userdata. I feel I am somewhere stucking eventhough everything is perfect.

  12. #12
    I have manually created another account by deleting the old user data it was created successfully buy when I check the WHM it shows 0 disk space even though all files are there.

  13. #13
    Quote Originally Posted by mharrisr View Post
    I have manually created another account by deleting the old user data it was created successfully buy when I check the WHM it shows 0 disk space even though all files are there.
    Type in SSH
    Code:
    /scripts/fixquotas
    /scripts/fixeverything

  14. #14
    All the important files are overwritten in appropriate places in /home

    Tried your command /scripts/fixquotas, /scripts/fixeverything still no change in file size.

    Another issue is it shows FTP time out fatal error in cpanel and the options are blank.
    Last edited by mharrisr; 06-21-2009 at 02:11 AM.

  15. #15
    I found that there is a permission conflict in the account folder since I tried to download a file and uploaded but it ends with 550 permission denied error and also not able to delete a file so if anyone can give a correct command for setting the correct permission I think my problem will be solved.

  16. #16
    Join Date
    May 2008
    Posts
    340
    It turns out there is incorrect permissions set to the directory/file from preventing the web server user from accessing it.

    Post the output of the following commands,

    ls -ald /home
    ls -ald /home/user/public_html
    Substitute your account username in place of user in the above command.
    ls -al /home/user/public_html

Similar Threads

  1. save restore dot com + website
    By wise in forum Domain Name with Web Site Offers
    Replies: 3
    Last Post: 09-10-2008, 10:15 AM
  2. please help : need to restore my old files
    By X-x-X in forum Hosting Security and Technology
    Replies: 8
    Last Post: 06-27-2007, 06:28 PM
  3. Restore to MYI files
    By netcommander in forum Hosting Security and Technology
    Replies: 5
    Last Post: 02-01-2006, 02:36 PM
  4. strange files after restore...
    By aisusa in forum Hosting Security and Technology
    Replies: 1
    Last Post: 11-16-2004, 04:51 AM
  5. php tarball?
    By nnormal in forum Programming Discussion
    Replies: 2
    Last Post: 03-26-2004, 01:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •