Skip to main content

volume_instance_pitr_restore_estimates

Creates, updates, deletes, gets or lists a volume_instance_pitr_restore_estimates resource.

Overview​

Namevolume_instance_pitr_restore_estimates
TypeResource
Idrailway.storage.volume_instance_pitr_restore_estimates

Fields​

The following fields are returned by SELECT queries:

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.

NameDatatypeDescription
base_backup_labelstring
data_mbinteger
estimated_scratch_mbinteger
likely_to_fitboolean
plan_max_size_mbinteger
wal_mbinteger

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselecttarget_timestamp, volume_instance_idsource_repo_pathEstimated 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.

NameDatatypeDescription
target_timestampstring (date-time)Point-in-time target the estimate is computed for.
volume_instance_idstringThe id of the source volume instance to restore from.
source_repo_pathstringMulti-history picker's selected archive sub-prefix, matching the restore mutation's argument. Pass null for the source's current history.

SELECT examples​

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 }}'
;