Futilities/server/backups/db-bak: Difference between revisions
< Futilities | server | backups
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 SessionFromSpec(string $uri, string $sPassword, string $fpDest) : Session; | '''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. | ||
* <syntaxhighlight lang=php inline>function SessionFromSpec(string $uri, string $sPassword, string $fpDest) : Session;</syntaxhighlight> | |||
===Session=== | ===Session=== | ||
* function Start() : bool; | * function Start() : bool; |
Revision as of 14:12, 18 January 2023
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;