package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
BackupManifestDescriptors returns the descriptors encoded in the manifest as a slice of mutable descriptors.
CheckForBackupLock returns true if a lock file for this job already exists.
CheckForPreviousBackup ensures that the target location does not already contain a previous or concurrently running backup.
DecompressData decompresses gzip data buffer and returns decompressed bytes.
ElideSkippedLayers removes backups that are skipped in the backup chain.
FileCmp gives an ordering to two backuppb.BackupManifest_File.
GetBackupIndexAtTime returns the index of the latest backup in `backupManifests` with a StartTime >= asOf.
GetBackupManifestIterFactories constructs a mapping from the idx of the backup layer to an IterFactory.
GetBackupManifests fetches the backup manifest from a list of backup URIs.
GetChecksum returns a 32 bit keyed-checksum for the given data.
GetLocalityInfo takes a list of stores and their URIs, along with the main backup manifest searches each for the locality pieces listed in the main manifest, returning the mapping.
GetStatisticsFromBackup retrieves Statistics from backup manifest, either through the Statistics field or from the files.
IsGZipped detects whether the given bytes represent GZipped data.
LoadBackupManifestsAtTime reads and returns the BackupManifests at the ExternalStorage locations in `uris`.
LoadSQLDescsFromBackupsAtTime returns the Descriptors found in the last (latest) backup with a StartTime >= asOf.
MakeBackupCodec returns the codec that was used to encode the keys in the backup.
NewDescriptorForManifest returns a descriptor instance for a protobuf to be added to a backup manifest or in a backup job.
NewFileSSTIter creates a new FileIterator to iterate over the storeFile.
NewIterFactory constructs a new IterFactory for a BackupManifest.
NewTimestampedCheckpointFileName returns a string of a new checkpoint filename with a suffixed version.
ReadBackupCheckpointManifest reads and unmarshals a BACKUP-CHECKPOINT manifest from filename in the provided export store.
ReadBackupManifest reads and unmarshals a BackupManifest from filename in the provided export store.
ReadBackupManifestFromStore reads and unmarshalls a BackupManifest from the store and returns it with the size it reserved for it from the boundAccount.
ReadBackupManifestFromURI creates an export store from the given URI, then reads and unmarshalls a BackupManifest at the standard location in the export storage.
SanitizeLocalityKV returns a sanitized version of the input string where all characters that are not alphanumeric or -, =, or _ are replaced with _.
TempCheckpointFileNameForJob returns temporary filename for backup manifest checkpoint.
ValidateEndTimeAndTruncate checks that the requested target time, if specified, is valid for the list of incremental backups resolved, truncating the results to the backup that contains the target time.
WriteBackupLock is responsible for writing a job ID suffixed `BACKUP-LOCK` file that will prevent concurrent backups from writing to the same location.
WriteBackupManifest compresses and writes the passed in BackupManifest `desc` to `exportStore`.
WriteBackupManifestCheckpoint writes a new BACKUP-CHECKPOINT MANIFEST and CHECKSUM file.
WriteBackupPartitionDescriptor writes metadata (containing a locality KV and partial file listing) for a partitioned BACKUP to one of the stores in the backup.
WriteDescsSST is responsible for writing the SST containing the Descriptor and DescriptorChanges field of the input BackupManifest.
WriteFilesListSST is responsible for constructing and writing the filePathInfo to dest.
WriteMetadataWithExternalSSTs writes a "slim" version of manifest to `exportStore`.
WriteTableStatistics writes a StatsTable object to a file of the filename to the specified exportStore.
# Constants
BackupFormatDescriptorTrackingVersion added tracking of complete DBs.
BackupLockFile is the prefix of the file name used by the backup job to lock the bucket from running concurrent backups to the same destination.
BackupManifestCheckpointName is the file name used to store the serialized BackupManifest proto while the backup is in progress.
BackupManifestChecksumSuffix indicates where the checksum for the manifest is stored if present.
BackupMetadataDescriptorsListPath is the name of the SST file containing the BackupManifest_Descriptors or BackupManifest_DescriptorRevisions of the backup.
BackupMetadataFilesListPath is the name of the SST file containing the BackupManifest_Files of the backup.
BackupProgressDirectory is the directory where all 22.1 and beyond CHECKPOINT files will be stored as we no longer want to overwrite them.
BackupStatisticsFileName is the file name used to store the serialized table statistics for the tables being backed up.
# Variables
ErrLocalityDescriptor is the sentinel error that is thrown when a locality descriptor is not found.
WriteMetadataWithExternalSSTsEnabled controls if we write a `BACKUP_METADATA` file along with external SSTs containing lists of `BackupManifest_Files` and descriptors.
# Structs
DescIterator is a simple iterator to iterate over descpb.Descriptors.
DescriptorRevisionIterator is a simple iterator to iterate over backuppb.BackupManifest_DescriptorRevisions.
FileIterator is a simple iterator to iterate over backuppb.BackupManifest_File.
IterFactory has provides factory methods to construct iterators that iterate over the `BackupManifest_Files`, `Descriptors`, and `BackupManifest_DescriptorRevision` in a `BackupManifest`.
# Type aliases
BackupFileDescriptors is an alias on which to implement sort's interface.
LayerToBackupManifestFileIterFactory is the mapping from the idx of the backup layer to an IterFactory.