Futilities/server/backups/db-bak: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
==Proposed Object API==
==Proposed Object API==
===Manager===
===Manager===
* function PublicKey() : string;
* function SessionFromSpec(string $uri, string $sPassword, string $fpDest) : Session;
* 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===
===Session===
* function Start() : bool;
* function Start() : bool;

Revision as of 13:57, 18 January 2023

Database Backup Futility

Proposed Object API

Manager

  • 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;