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.

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:
    66
    Likes Received:
    0
    Trophy Points:
    6
    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:
    66
    Likes Received:
    0
    Trophy Points:
    6
    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 Forums Analyst
    Staff Member

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

    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
Loading...

Share This Page