Class BackupRestorePlan
What a restore would do, worked out without doing any of it (PlanRestore(string, PointSelector, string, BackupRestoreOptions)): the point (or, for an LSN or a time, the base and the archived WAL), the target as the restore resolves it, what would stop it, and the fingerprint ApprovedPlan binds a restore to.
public sealed record BackupRestorePlan : IEquatable<BackupRestorePlan>
- Inheritance
-
BackupRestorePlan
- Implements
- Inherited Members
Constructors
BackupRestorePlan(string, string, string, IReadOnlyList<uint>, long, uint, long, long, long, Guid, int, long, long, DateTime?, RestoreRefusalReason?, RestoreUnreachableReason?, string, IReadOnlyList<long>)
What a restore would do, worked out without doing any of it (PlanRestore(string, PointSelector, string, BackupRestoreOptions)): the point (or, for an LSN or a time, the base and the archived WAL), the target as the restore resolves it, what would stop it, and the fingerprint ApprovedPlan binds a restore to.
public BackupRestorePlan(string Fingerprint, string ResolvedTarget, string DisplacedBundle, IReadOnlyList<uint> Chain, long BytesToRead, uint BaseBackupId, long CheckpointLsn, long PointLsn, long TargetLsn, Guid TimelineId, int ArchivedSegments, long ArchivedBytes, long SampleLsn, DateTime? SampleUtc, RestoreRefusalReason? Refusal, RestoreUnreachableReason? Unreachable, string RefusalMessage, IReadOnlyList<long> NearestRestorable)
Parameters
FingerprintstringIdentifies what would be restored and where; it changes when the chain, the archived WAL used, the cut or the target change.
ResolvedTargetstringThe bundle the restore writes; null when no target was given or it is refused by name.
DisplacedBundlestringWhere Replace moves the existing target; null when there is none.
ChainIReadOnlyList<uint>The points whose packs are read, base first.
BytesToReadlongThe packs' and archived segments' bytes.
BaseBackupIduintThe point restored (the base, for an LSN or a time); 0 when unreachable.
CheckpointLsnlongThe base's
C.PointLsnlongThe restored database's last LSN: the point's
P, orL'for an LSN or a time.TargetLsnlongThe LSN asked for, or the one an instant resolved to; 0 for a point.
TimelineIdGuidThe timeline restored from.
ArchivedSegmentsintArchived WAL segments the restore reads.
ArchivedByteslongTheir file bytes.
SampleLsnlongFor an instant, the LSN of the time sample used; 0 otherwise.
SampleUtcDateTime?For an instant, the sample's time; null otherwise.
RefusalRestoreRefusalReason?Why the restore would be refused; null when it would not.
UnreachableRestoreUnreachableReason?Why an LSN or a time cannot be reached; null when it can.
RefusalMessagestringThe refusal's message; null when none.
NearestRestorableIReadOnlyList<long>For an unreachable target, the restorable LSNs nearest it.
Properties
ArchivedBytes
Their file bytes.
public long ArchivedBytes { get; init; }
Property Value
ArchivedSegments
Archived WAL segments the restore reads.
public int ArchivedSegments { get; init; }
Property Value
BaseBackupId
The point restored (the base, for an LSN or a time); 0 when unreachable.
public uint BaseBackupId { get; init; }
Property Value
BytesToRead
The packs' and archived segments' bytes.
public long BytesToRead { get; init; }
Property Value
CanRestore
Whether the restore would proceed as planned.
public bool CanRestore { get; }
Property Value
Chain
The points whose packs are read, base first.
public IReadOnlyList<uint> Chain { get; init; }
Property Value
CheckpointLsn
The base's C.
public long CheckpointLsn { get; init; }
Property Value
DisplacedBundle
Where Replace moves the existing target; null when there is none.
public string DisplacedBundle { get; init; }
Property Value
Fingerprint
Identifies what would be restored and where; it changes when the chain, the archived WAL used, the cut or the target change.
public string Fingerprint { get; init; }
Property Value
NearestRestorable
For an unreachable target, the restorable LSNs nearest it.
public IReadOnlyList<long> NearestRestorable { get; init; }
Property Value
PointLsn
The restored database's last LSN: the point's P, or L' for an LSN or a time.
public long PointLsn { get; init; }
Property Value
Refusal
Why the restore would be refused; null when it would not.
public RestoreRefusalReason? Refusal { get; init; }
Property Value
RefusalMessage
The refusal's message; null when none.
public string RefusalMessage { get; init; }
Property Value
ResolvedTarget
The bundle the restore writes; null when no target was given or it is refused by name.
public string ResolvedTarget { get; init; }
Property Value
SampleLsn
For an instant, the LSN of the time sample used; 0 otherwise.
public long SampleLsn { get; init; }
Property Value
SampleUtc
For an instant, the sample's time; null otherwise.
public DateTime? SampleUtc { get; init; }
Property Value
TargetLsn
The LSN asked for, or the one an instant resolved to; 0 for a point.
public long TargetLsn { get; init; }
Property Value
TimelineId
The timeline restored from.
public Guid TimelineId { get; init; }
Property Value
Unreachable
Why an LSN or a time cannot be reached; null when it can.
public RestoreUnreachableReason? Unreachable { get; init; }
Property Value
Methods
Deconstruct(out string, out string, out string, out IReadOnlyList<uint>, out long, out uint, out long, out long, out long, out Guid, out int, out long, out long, out DateTime?, out RestoreRefusalReason?, out RestoreUnreachableReason?, out string, out IReadOnlyList<long>)
public void Deconstruct(out string Fingerprint, out string ResolvedTarget, out string DisplacedBundle, out IReadOnlyList<uint> Chain, out long BytesToRead, out uint BaseBackupId, out long CheckpointLsn, out long PointLsn, out long TargetLsn, out Guid TimelineId, out int ArchivedSegments, out long ArchivedBytes, out long SampleLsn, out DateTime? SampleUtc, out RestoreRefusalReason? Refusal, out RestoreUnreachableReason? Unreachable, out string RefusalMessage, out IReadOnlyList<long> NearestRestorable)
Parameters
FingerprintstringResolvedTargetstringDisplacedBundlestringChainIReadOnlyList<uint>BytesToReadlongBaseBackupIduintCheckpointLsnlongPointLsnlongTargetLsnlongTimelineIdGuidArchivedSegmentsintArchivedByteslongSampleLsnlongSampleUtcDateTime?RefusalRestoreRefusalReason?UnreachableRestoreUnreachableReason?RefusalMessagestringNearestRestorableIReadOnlyList<long>
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(BackupRestorePlan?)
public bool Equals(BackupRestorePlan? other)
Parameters
otherBackupRestorePlan
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(BackupRestorePlan?, BackupRestorePlan?)
public static bool operator ==(BackupRestorePlan? left, BackupRestorePlan? right)
Parameters
leftBackupRestorePlanrightBackupRestorePlan
Returns
operator !=(BackupRestorePlan?, BackupRestorePlan?)
public static bool operator !=(BackupRestorePlan? left, BackupRestorePlan? right)
Parameters
leftBackupRestorePlanrightBackupRestorePlan