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.

Backup bug - very simple to fix, bu not touched almoust a year.

Discussion in 'General Discussion' started by ankesen, Dec 7, 2005.

  1. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Cpanel is restoring accounts in this manner:


    Restoring Mail files
    Done

    ...


    Restoring subdomains

    ..Done


    Restoring parked domains

    ..Done


    Restoring addon domains

    ..Done




    So as You can see, first mail aliases are copied, then subdomains are restored.
    But then Addon Domains are restortd and all aliases and subdomains previously restored are overwritten. So basicly You cant easy restore backup, because You must manualy add subdomains once more, and then copy valiases files from backup manualy too. It so simple, why they won't fix it - just change order of restoring. I would do some fix myself, but restoring is hidden in binary file /usr/local/cpanel/whostmgr/bin/whostmgr2.
     
  2. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    What version (build number) are you using?
     
  3. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    stables mostly, but about 6 month ago I've tested this on edge, current, release and stable. Same on every version. Easy to test - create account, add fe. 2 addon domains, add subdomains to those and mail aliases. Then backup this account, delete and restore from backup. Subdomains will be missing, mailailiases too.
     
  4. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    BTW. I have 1200 accounts to move across the servers. Logging to eachone and manualy adding missing subdomains is a little problem. I would be nice, if cPanel could just change the order in restore script, and spare me 72hrs of clicking. I can do myself, but this in binary file...
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Ben is asking you what version of cPanel you are using, not which build tree which is not relevant. Probably your OS would help if it's not an RH derivative.

    I've done many restores on the latest versions and never had a problem with restoring addon, parked subdomains or mail aliases.
     
  6. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Currently we have about 40 cpanel servers. Mostly:
    WHM 10.8.0 cPanel 10.8.1-S31
    CentOS 4.2 i686 - WHM X v3.1.0
    Since 2 years I have never seen succesfull restore with subdomain-of-an-addon-domain and mailailases of addon's. We have moved thousends of accounts, and only if subdomain have fe. redirects it will be recreated. It's ultra easy to reproduce.
    1. create account for test (fe. login dtst, domain dtst.com ).
    2. add addon domain (fe. dom.com)
    3. add subs to it ( fe. s1.dom.com, s2.dom.com )
    4. add some mail aliases ( m1@dom.com -> somwhere )
    5. do a backup of this account.
    6. delete
    7. restore from backup.

    As restore script is used in accs. transfer also - any migration has same problem. I've post it into buglist about year ago, confirmed by Dan from cPanel - problem exist. I supose it's just wrong order of restoring but I don't know internals of cPanel, so it's just a guess.
     
  7. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    The main reason I asked is because this was changed many months ago. The current order is as follows:

    Restoring cpanel user config file
    Restoring reseller privs (if any)
    Restoring SSL keys and Certificates
    Restoring frontpage (if installed)
    Restoring MySQL privs
    Reloading MySQL
    Restoring PostgreSQL privs
    Restoring Mailman lists
    Restoring Mailman Archives
    Restoring quota
    Restoring shell
    Restoring password
    Restoring proftpd file
    Resyncing Ftp Passwords
    Restoring subdomains
    Restoring parked domains
    Restoring addon domains
    Doing fileprotect conversion
    Restoring nobody owned files
    Setting interchange permissions
    Restoring Mail files
    Converting email to cPanel 5+ (if needed)
    Reconfiguring email Passwords (if needed)
    Fixing mail permissions
    Fixing mail autoresponders
    Restoring crontab
    Converting to maildir if needed
    Restore Complete

    As you can see, restoring mail occurs long after the domains are restored.
     
  8. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    But addon-doms still after subdomains. I will test if mailaliases of addons are restored correctly on stable version today. Subdomains are more important, as in mass migration I'm just copying manualy all /etc/valiases by hand. But each subdomain must be 'clicked'.
     
    #8 ankesen, Dec 8, 2005
    Last edited: Dec 8, 2005
  9. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Just made an test on latest stable (10.8.1-STABLE_31)
    1. create new account
    2. add addon-domain
    3. add mail-aliases to addon
    4. subdomain to addon
    5. transfer onto other server.
    Subdomain is missing.
    Aliases are missing.

    Just take a 5 mins breake and do this test. I currently all my cPanels are stable versions, but I supose it's on others too.
     
  10. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    Just tested this myself after having another person test it earlier today, and it works for me too. Your instructions are pretty simple. Have you left out any other conditions? Please submit a support ticket so that we can look into your specific server.
     
  11. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I've posted this:
    http://bugzilla.cpanel.net/show_bug.cgi?id=1240
    over a year ago. Only soultion You've found is to manualy add missing subdomains. Sadly I don't have direct access to submiting tickets. I can mail You my server details. We have very standard configurations, plus fantastico&rvskin.
     
  12. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If a cPanel employee says that you can log a ticket, then you can go ahead and do so on their site whether your license is direct or not.
     
  13. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    Thanks for your persistence ankesen. This issue is resolved in Edge builds.
     
  14. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    That was an efficient exchange :) When you say resolved in Edge, when would that make it to Release?

    David
     
  15. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    No earlier than late next week.
     
  16. ankesen

    ankesen Member

    Joined:
    Feb 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Great - subdomains are now restored OK - tested in EDGE build by our techs, but got info, that mail-aliases added to _addon-domain_ are not restored - just blank files are putted in /etc/valiases instead of ones in tars. Please try to reproduce and check.
     
Loading...

Share This Page