volume_instance_pitr_restore_estimates
Creates, updates, deletes, gets or lists a volume_instance_pitr_restore_estimates resource.
Overview​
| Name | volume_instance_pitr_restore_estimates |
| Type | Resource |
| Id | railway.storage.volume_instance_pitr_restore_estimates |
Fields​
The following fields are returned by SELECT queries:
- get
One PitrRestoreScratchEstimate row. Estimated destination-volume scratch a PITR restore to a target needs: the base backup's data plus every WAL segment replayed from that backup to the target (Postgres holds replayed WAL in pg_wal faster than restartpoints recycle it). A conservative over-estimate for a non-blocking pre-restore warning — not a gate.
| Name | Datatype | Description |
|---|---|---|
base_backup_label | string | |
data_mb | integer | |
estimated_scratch_mb | integer | |
likely_to_fit | boolean | |
plan_max_size_mb | integer | |
wal_mb | integer |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | target_timestamp, volume_instance_id | source_repo_path | Estimated destination-volume scratch a PITR restore of this volume instance to a target would need, and whether it fits the workspace plan's max volume size. Read-only pre-check the restore dialog calls to warn before a restore that would fill the disk mid-replay; returns null when no estimate can be formed (non-pgBackRest source, incomplete archive creds, or a target before the earliest backup). Backed by the Railway GraphQL query volumeInstancePitrRestoreEstimate. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
target_timestamp | string (date-time) | Point-in-time target the estimate is computed for. |
volume_instance_id | string | The id of the source volume instance to restore from. |
source_repo_path | string | Multi-history picker's selected archive sub-prefix, matching the restore mutation's argument. Pass null for the source's current history. |
SELECT examples​
- get
Estimated destination-volume scratch a PITR restore of this volume instance to a target would need, and whether it fits the workspace plan's max volume size. Read-only pre-check the restore dialog calls to warn before a restore that would fill the disk mid-replay; returns null when no estimate can be formed (non-pgBackRest source, incomplete archive creds, or a target before the earliest backup). Backed by the Railway GraphQL query volumeInstancePitrRestoreEstimate.
SELECT
base_backup_label,
data_mb,
estimated_scratch_mb,
likely_to_fit,
plan_max_size_mb,
wal_mb
FROM railway.storage.volume_instance_pitr_restore_estimates
WHERE target_timestamp = '{{ target_timestamp }}' -- required
AND volume_instance_id = '{{ volume_instance_id }}' -- required
AND source_repo_path = '{{ source_repo_path }}'
;