Futilities/server/backups/db-bak

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

Proposed Object API

Manager

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

The calling process uses Manager's public key to encrypt the db password, and then requests a Session object.

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;