Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

hook on PkgAcct:Restore cannot retrieve data from package

Discussion in 'cPanel Developers' started by tizoo, May 22, 2015.

  1. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    With an hook on PkgAcct:Create we add some data in the account backup as well as in the package generated when transfering an account from one server to another.

    We try to retrieve those data using another hook on PkgAcct:Restore.

    The problem is that in any stages (postExtract or post) we can access the unarchived package.

    We guessed it could be :

    Code:
    $data->{'dir'} . '/' . $data->{'extractname'}
    But this directory doesn't exists.

    Does anyone know where is the archive extracted ?
    Why is it not accessible in an output parameter ?

    Thank in advance for any tips.
     
  2. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    156
    Hi all,

    An answer to ourselves...

    Finally we use Perl Archive::Tar module to solve this problem and everything works now like a charme.

    Thanks for the time you spent on our problem and have a nice week-end,
    Philippe
     
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice