hook on PkgAcct:Restore cannot retrieve data from package

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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.
 

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Finally we use Perl Archive::Tar module to solve this problem and everything works now like a charme.
Hello,

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