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.

cPanel Migration - Quota is set, but not will not configured

Discussion in 'cPanel Developers' started by musti19, Jul 28, 2013.

  1. musti19

    musti19 Well-Known Member

    Joined:
    Jan 20, 2013
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,
    im writing a migrationscript, where i set the quota
    in quota file:

    PHP:
    /quota
    with the content:
    PHP:
    200
    for 200MB,
    but if i execute /scripts/restorepkg the quota is then 0,unlimited.

    Where can be the problem?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You may want to consider modifying the package of the account after it's restored in your custom script:

    Change Package API

    This will ensure the quota is assigned and preserved for the account.

    Thank you.
     
  3. musti19

    musti19 Well-Known Member

    Joined:
    Jan 20, 2013
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I dont/can't use a api.
    In which file is the quota information stored?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The quota value should be defined in the packaged account. Thus, if it was set to unlimited on the server where it was packaged, it will use that value when it's restored by /scripts/restorepkg. Could you describe the migration script you are developing in a bit more detail? For instance, is there a specific reason why you prefer not to use the API provided by cPanel?

    Thank you.
     
  5. musti19

    musti19 Well-Known Member

    Joined:
    Jan 20, 2013
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I found the solution:
    The quota file should be in binary
     
Loading...

Share This Page