Futilities/server/backups/db-bak

From Woozle Writes Code
< Futilities‎ | server‎ | backups
Revision as of 14:12, 18 January 2023 by Woozle (talk | contribs)
Jump to navigation Jump to search
Database Backup Futility

Proposed Object API

Manager

Thinking: A "Session" is basically just a set of parameters that will work to start the backup. The PoingyX API exists to assist with ensuring that all the needed parameters are present and valid.

  • function SessionFromSpec(string $uri, string $sPassword, string $fpDest) : Session;

Session

  • function Start() : bool;
  • function CheckStatus() : Status;

The calling process calls Start() to initiate the backup, then repeatedly calls CheckStatus() to see how it's going. This can be reported to an interactive user or just checked for the completion flag.

Status

  • function UnitsDone() : int;
  • function UnitsTotal() : int; // can be zero if unknown
  • function IsDone() : bool;
  • function IsOkay() : bool;
  • function Message() : string;