# Return account backup progress

This function returns progress information for a cPanel account backup.

Note:
When the PkgAcct::Create hook is installed, that hook anchors the
run's start and finish, and the function reports complete only after
it confirms the published archive in the home directory, along with the
archive's exact final size. A run that never publishes an archive is
therefore never reported as complete. Without the hook, the function
falls back to the on-disk marker file. When no run is active, the
state return value is none and the other return values are 0 or
null. When the function cannot determine the account's disk usage, the
estimatedTotalBytes and estimatedPercent return values are 0 even
while a run is active.

Endpoint: GET /BackupInfo/progress
Version: 11.138.0.10
Security: BasicAuth

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "progress"

  - `module` (string)
    The name of the module called.
    Example: "BackupInfo"

  - `result` (object)

  - `result.data` (object)

  - `result.data.currentBytes` (integer)
    Current size in bytes of the growing .tar.gz archive.
    Example: 104857600

  - `result.data.elapsedSeconds` (integer)
    Seconds since the run started. 0 when not
running.
    Example: 42

  - `result.data.estimatedPercent` (number)
    Completion percent, from 0 to 100.

Note:
While a run is active this return value is an
estimate and the function clamps it to 99, because
the final archive is gzipped and the function
multiplies the byte total by a heuristic
compression factor. The interface must label it as
estimated. The value is exactly 100 only when the
state return value is complete and the
published archive is present.
    Example: 33.3

  - `result.data.estimatedTotalBytes` (integer)
    Estimated final archive size in bytes. The
function multiplies the home directory, database
and mailing list byte totals by the gzip
compression factor to produce this value.

Note:
The returned value is 0 when quota data is
unavailable.
    Example: 314572800

  - `result.data.finishedAtEpoch` (integer,null)
    The finish time, in epoch seconds.

Note:
The function sets this only when the hook confirms
the complete state and the published archive is
present. It is null otherwise.
    Example: 1750640400

  - `result.data.startedAtEpoch` (integer,null)
    The start time, in epoch seconds. Null when not
running.

Note:
This comes from the hook record when that is
available, and otherwise from the marker file.
    Example: 1750636800

  - `result.data.state` (string)
    The current run state.

* inprogress - A run is active or finalizing.
* timeout - A run is active but has passed the
  timeout ceiling.
* complete - The published archive is confirmed
  in the home directory. This state persists
  across polls until a new run starts or the
  BackupInfo::reset function is called.
* none - Nothing is running.
    Enum: "inprogress", "timeout", "complete", "none"

  - `result.data.stateSource` (string)
    Origin of the state value.

* hook - The authoritative PkgAcct::Create
  record, which gives a definitive start and
  finish.
* marker - The estimated fallback derived from
  the on-disk marker file.
* none - Nothing is running.
    Enum: "hook", "marker", "none"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more
  details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings
describe non-critical failures or other problematic
conditions noted while running an API.


