TABLE
TABLE = 'strata_restore_log'
The table restores are recorded in.
The record of who restored what, when, and what it did.
One of the two tables nothing in the bucket can reproduce, and the reason an uninstall exports before dropping. The bucket records what the site looked like; this records what someone did to it.
A row is written BEFORE the restore runs, with the outcome pending and the plan already in it. A restore that crashes half way therefore leaves a row saying it started and never finished, which is the state an operator needs to see. Writing the row afterwards would mean the only restores on record are the ones that worked.
open(\Drupal\strata\Restore\RestorePlan $plan, string $scope, string $mode = \self::LOGICAL, int|null $actor = null, string|null $snapshot = null) : int
Opens a row for a restore that is about to run.
| \Drupal\strata\Restore\RestorePlan | $plan | What the restore intends to do. |
| string | $scope | What it was scoped to, as the operator expressed it. |
| string | $mode | Either RestoreAudit::LOGICAL or RestoreAudit::PHYSICAL. |
| int|null | $actor | Drupal user id running it, or NULL for an unattended run. |
| string|null | $snapshot | Commit taken before the restore so it can be undone, or NULL when none was taken. |
The row id, to close the entry with.
refuse(\Drupal\strata\Restore\RestorePlan $plan, string $scope, string $reason, string $mode = \self::LOGICAL, int|null $actor = null) : int
Records a restore that declined to start.
| \Drupal\strata\Restore\RestorePlan | $plan | What it would have done. |
| string | $scope | What it was scoped to. |
| string | $reason | Why it refused. |
| string | $mode | Either RestoreAudit::LOGICAL or RestoreAudit::PHYSICAL. |
| int|null | $actor | Drupal user id, or NULL. |
The row id.