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

From Woozle Writes Code
Jump to navigation Jump to search
(Created page with "{{fmt/title|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(); * function CheckStatus() : Status; The calling process calls Start() to initiate the backup, then repeatedly calls CheckStatus() to s...")
 
No edit summary
Line 8: Line 8:
The calling process uses Manager's public key to encrypt the db password, and then requests a Session object.
The calling process uses Manager's public key to encrypt the db password, and then requests a Session object.
===Session===
===Session===
* function Start();
* function Start() : bool;
* function CheckStatus() : Status;
* function CheckStatus() : Status;


Line 16: Line 16:
* function UnitsTotal() : int; // can be zero if unknown
* function UnitsTotal() : int; // can be zero if unknown
* function IsDone() : bool;
* function IsDone() : bool;
* function IsOkay() : bool;
* function Message() : string;

Revision as of 21:55, 17 January 2023

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;