cockroach: github.com/cockroachdb/cockroach/pkg/ccl/backupccl Index | Files

package backupccl

import "github.com/cockroachdb/cockroach/pkg/ccl/backupccl"

Index

Package Files

backup.pb.go backup_job.go backup_planning.go backup_processor.go backup_processor_planning.go create_scheduled_backup.go manifest_handling.go restore_data_processor.go restore_job.go restore_planning.go restore_processor_planning.go restore_schema_change_creation.go schedule_exec.go show.go split_and_scatter_processor.go targets.go

Constants

const (
    // BackupManifestName is the file name used for serialized
    // BackupManifest protos.
    BackupManifestName = "BACKUP"
    // BackupNewManifestName is a future name for the serialized
    // BackupManifest proto.
    BackupNewManifestName = "BACKUP_MANIFEST"

    // BackupPartitionDescriptorPrefix is the file name prefix for serialized
    // BackupPartitionDescriptor protos.
    BackupPartitionDescriptorPrefix = "BACKUP_PART"
    // BackupManifestCheckpointName is the file name used to store the
    // serialized BackupManifest proto while the backup is in progress.
    BackupManifestCheckpointName = "BACKUP-CHECKPOINT"
    // BackupFormatDescriptorTrackingVersion added tracking of complete DBs.
    BackupFormatDescriptorTrackingVersion uint32 = 1
    // ZipType is the format of a GZipped compressed file.
    ZipType = "application/x-gzip"
    // BackupStatisticsFileName is the file name used to store the serialized table
    // statistics for the tables being backed up.
    BackupStatisticsFileName = "BACKUP-STATISTICS"
)

Variables

var (
    ErrInvalidLengthBackup = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowBackup   = fmt.Errorf("proto: integer overflow")
)
var BackupCheckpointInterval = time.Minute

BackupCheckpointInterval is the interval at which backup progress is saved to durable storage.

var EncryptionInfo_Scheme_name = map[int32]string{
    0: "AES256GCM",
}
var EncryptionInfo_Scheme_value = map[string]int32{
    "AES256GCM": 0,
}
var MVCCFilter_name = map[int32]string{
    0:  "Latest",
    1:  "All",
}
var MVCCFilter_value = map[string]int32{
    "Latest": 0,
    "All":    1,
}
var ScheduledBackupExecutionArgs_BackupType_name = map[int32]string{
    0:  "FULL",
    1:  "INCREMENTAL",
}
var ScheduledBackupExecutionArgs_BackupType_value = map[string]int32{
    "FULL":        0,
    "INCREMENTAL": 1,
}

func CheckObjectExists Uses

func CheckObjectExists(
    ctx context.Context,
    txn *kv.Txn,
    codec keys.SQLCodec,
    parentID descpb.ID,
    parentSchemaID descpb.ID,
    name string,
) error

CheckObjectExists returns an error if an object already exists with a given parent, parent schema and name.

func DecompressData Uses

func DecompressData(descBytes []byte) ([]byte, error)

DecompressData decompresses gzip data buffer and returns decompressed bytes.

func ResolveTargetsToDescriptors Uses

func ResolveTargetsToDescriptors(
    ctx context.Context, p sql.PlanHookState, endTime hlc.Timestamp, targets *tree.TargetList,
) ([]sqlbase.Descriptor, []descpb.ID, error)

ResolveTargetsToDescriptors performs name resolution on a set of targets and returns the resulting descriptors.

func RewriteTableDescs Uses

func RewriteTableDescs(
    tables []*sqlbase.MutableTableDescriptor, descriptorRewrites DescRewriteMap, overrideDB string,
) error

RewriteTableDescs mutates tables to match the ID and privilege specified in descriptorRewrites, as well as adjusting cross-table references to use the new IDs. overrideDB can be specified to set database names in views.

func VerifyUsableExportTarget Uses

func VerifyUsableExportTarget(
    ctx context.Context,
    settings *cluster.Settings,
    exportStore cloud.ExternalStorage,
    readable string,
    encryption *jobspb.BackupEncryptionOptions,
) error

VerifyUsableExportTarget ensures that the target location does not already contain a BACKUP or checkpoint and writes an empty checkpoint, both verifying that the location is writable and locking out accidental concurrent operations on that location if subsequently try this check. Callers must clean up the written checkpoint file (BackupManifestCheckpointName) only after writing to the backup file location (BackupManifestName).

func WriteDescriptors Uses

func WriteDescriptors(
    ctx context.Context,
    txn *kv.Txn,
    databases []*sqlbase.ImmutableDatabaseDescriptor,
    schemas []sqlbase.SchemaDescriptor,
    tables []sqlbase.TableDescriptor,
    types []sqlbase.TypeDescriptor,
    descCoverage tree.DescriptorCoverage,
    settings *cluster.Settings,
    extra []roachpb.KeyValue,
) error

WriteDescriptors writes all the the new descriptors: First the ID -> TableDescriptor for the new table, then flip (or initialize) the name -> ID entry so any new queries will use the new one. The tables are assigned the permissions of their parent database and the user must have CREATE permission on that database at the time this function is called.

type BackupFileDescriptors Uses

type BackupFileDescriptors []BackupManifest_File

BackupFileDescriptors is an alias on which to implement sort's interface.

func (BackupFileDescriptors) Len Uses

func (r BackupFileDescriptors) Len() int

func (BackupFileDescriptors) Less Uses

func (r BackupFileDescriptors) Less(i, j int) bool

func (BackupFileDescriptors) Swap Uses

func (r BackupFileDescriptors) Swap(i, j int)

type BackupManifest Uses

type BackupManifest struct {
    StartTime  hlc.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time"`
    EndTime    hlc.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time"`
    MVCCFilter MVCCFilter    `protobuf:"varint,13,opt,name=mvcc_filter,json=mvccFilter,proto3,enum=cockroach.ccl.backupccl.MVCCFilter" json:"mvcc_filter,omitempty"`
    // Even if StartTime is zero, we only get revisions since gc threshold, so
    // do not allow AS OF SYSTEM TIME before revision_start_time.
    RevisionStartTime hlc.Timestamp `protobuf:"bytes,17,opt,name=revision_start_time,json=revisionStartTime,proto3" json:"revision_start_time"`
    // Spans contains the spans requested for backup. The keyranges covered by
    // `files` may be a subset of this if there were ranges with no changes since
    // the last backup. For all tables in the backup descriptor, these spans must
    // completely cover each table's span. For example, if a table with ID 51 were
    // being backed up, then the span `/Table/5{1-2}` must be completely covered.
    Spans []roachpb.Span `protobuf:"bytes,3,rep,name=spans,proto3" json:"spans"`
    // IntroducedSpans are a subset of spans, set only when creating incremental
    // backups that cover spans not included in a previous backup. Spans contained
    // here are covered in the interval (0, startTime], which, in conjunction with
    // the coverage from (startTime, endTime] implied for all spans in Spans,
    // results in coverage from [0, endTime] for these spans.
    IntroducedSpans   []roachpb.Span                      `protobuf:"bytes,15,rep,name=introduced_spans,json=introducedSpans,proto3" json:"introduced_spans"`
    DescriptorChanges []BackupManifest_DescriptorRevision `protobuf:"bytes,16,rep,name=descriptor_changes,json=descriptorChanges,proto3" json:"descriptor_changes"`
    Files             []BackupManifest_File               `protobuf:"bytes,4,rep,name=files,proto3" json:"files"`
    Descriptors       []descpb.Descriptor                 `protobuf:"bytes,5,rep,name=descriptors,proto3" json:"descriptors"`
    Tenants           []BackupManifest_Tenant             `protobuf:"bytes,24,rep,name=tenants,proto3" json:"tenants"`
    // databases in descriptors that have all tables also in descriptors.
    CompleteDbs   []github_com_cockroachdb_cockroach_pkg_sql_catalog_descpb.ID `protobuf:"varint,14,rep,packed,name=complete_dbs,json=completeDbs,proto3,casttype=github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb.ID" json:"complete_dbs,omitempty"`
    EntryCounts   RowCount                                                     `protobuf:"bytes,12,opt,name=entry_counts,json=entryCounts,proto3" json:"entry_counts"`
    Dir           roachpb.ExternalStorage                                      `protobuf:"bytes,7,opt,name=dir,proto3" json:"dir"`
    FormatVersion uint32                                                       `protobuf:"varint,8,opt,name=format_version,json=formatVersion,proto3" json:"format_version,omitempty"`
    ClusterID     github_com_cockroachdb_cockroach_pkg_util_uuid.UUID          `protobuf:"bytes,9,opt,name=cluster_id,json=clusterId,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"cluster_id"`
    // node_id and build_info of the gateway node (which writes the descriptor).
    NodeID                       github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,10,opt,name=node_id,json=nodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"node_id,omitempty"`
    BuildInfo                    build.Info                                          `protobuf:"bytes,11,opt,name=build_info,json=buildInfo,proto3" json:"build_info"`
    ID                           github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,18,opt,name=id,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"id"`
    PartitionDescriptorFilenames []string                                            `protobuf:"bytes,19,rep,name=partition_descriptor_filenames,json=partitionDescriptorFilenames,proto3" json:"partition_descriptor_filenames,omitempty"`
    LocalityKVs                  []string                                            `protobuf:"bytes,20,rep,name=locality_kvs,json=localityKvs,proto3" json:"locality_kvs,omitempty"`
    // This field is used by backups in 19.2 and 20.1 where a backup manifest stores all the table
    // statistics in the field, the later versions all write the statistics to a separate file
    // indicated in the table_statistic_files field.
    DeprecatedStatistics []*stats.TableStatisticProto                                          `protobuf:"bytes,21,rep,name=deprecated_statistics,json=deprecatedStatistics,proto3" json:"deprecated_statistics,omitempty"`
    StatisticsFilenames  map[github_com_cockroachdb_cockroach_pkg_sql_catalog_descpb.ID]string `protobuf:"bytes,23,rep,name=statistics_filenames,json=statisticsFilenames,proto3,castkey=github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb.ID" json:"statistics_filenames,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    DescriptorCoverage   github_com_cockroachdb_cockroach_pkg_sql_sem_tree.DescriptorCoverage  `protobuf:"varint,22,opt,name=descriptor_coverage,json=descriptorCoverage,proto3,casttype=github.com/cockroachdb/cockroach/pkg/sql/sem/tree.DescriptorCoverage" json:"descriptor_coverage,omitempty"`
}

BackupManifest represents a consistent snapshot of ranges.

Each range snapshot includes a path to data that is a diff of the data in that key range between a start and end timestamp. The end timestamp of all ranges in a backup is the same, but the start may vary (to allow individual tables to be backed up on different schedules).

func ReadBackupManifestFromURI Uses

func ReadBackupManifestFromURI(
    ctx context.Context,
    uri string,
    user string,
    makeExternalStorageFromURI cloud.ExternalStorageFromURIFactory,
    encryption *jobspb.BackupEncryptionOptions,
) (BackupManifest, error)

ReadBackupManifestFromURI creates an export store from the given URI, then reads and unmarshals a BackupManifest at the standard location in the export storage.

func (*BackupManifest) Descriptor Uses

func (*BackupManifest) Descriptor() ([]byte, []int)

func (*BackupManifest) Marshal Uses

func (m *BackupManifest) Marshal() (dAtA []byte, err error)

func (*BackupManifest) MarshalTo Uses

func (m *BackupManifest) MarshalTo(dAtA []byte) (int, error)

func (*BackupManifest) ProtoMessage Uses

func (*BackupManifest) ProtoMessage()

func (*BackupManifest) Reset Uses

func (m *BackupManifest) Reset()

func (*BackupManifest) Size Uses

func (m *BackupManifest) Size() (n int)

func (*BackupManifest) String Uses

func (m *BackupManifest) String() string

func (*BackupManifest) Unmarshal Uses

func (m *BackupManifest) Unmarshal(dAtA []byte) error

func (*BackupManifest) XXX_DiscardUnknown Uses

func (m *BackupManifest) XXX_DiscardUnknown()

func (*BackupManifest) XXX_Marshal Uses

func (m *BackupManifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackupManifest) XXX_Merge Uses

func (dst *BackupManifest) XXX_Merge(src proto.Message)

func (*BackupManifest) XXX_Size Uses

func (m *BackupManifest) XXX_Size() int

func (*BackupManifest) XXX_Unmarshal Uses

func (m *BackupManifest) XXX_Unmarshal(b []byte) error

type BackupManifest_DescriptorRevision Uses

type BackupManifest_DescriptorRevision struct {
    Time hlc.Timestamp                                              `protobuf:"bytes,1,opt,name=time,proto3" json:"time"`
    ID   github_com_cockroachdb_cockroach_pkg_sql_catalog_descpb.ID `protobuf:"varint,2,opt,name=ID,proto3,casttype=github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb.ID" json:"ID,omitempty"`
    Desc *descpb.Descriptor                                         `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"`
}

func (*BackupManifest_DescriptorRevision) Descriptor Uses

func (*BackupManifest_DescriptorRevision) Descriptor() ([]byte, []int)

func (*BackupManifest_DescriptorRevision) Marshal Uses

func (m *BackupManifest_DescriptorRevision) Marshal() (dAtA []byte, err error)

func (*BackupManifest_DescriptorRevision) MarshalTo Uses

func (m *BackupManifest_DescriptorRevision) MarshalTo(dAtA []byte) (int, error)

func (*BackupManifest_DescriptorRevision) ProtoMessage Uses

func (*BackupManifest_DescriptorRevision) ProtoMessage()

func (*BackupManifest_DescriptorRevision) Reset Uses

func (m *BackupManifest_DescriptorRevision) Reset()

func (*BackupManifest_DescriptorRevision) Size Uses

func (m *BackupManifest_DescriptorRevision) Size() (n int)

func (*BackupManifest_DescriptorRevision) String Uses

func (m *BackupManifest_DescriptorRevision) String() string

func (*BackupManifest_DescriptorRevision) Unmarshal Uses

func (m *BackupManifest_DescriptorRevision) Unmarshal(dAtA []byte) error

func (*BackupManifest_DescriptorRevision) XXX_DiscardUnknown Uses

func (m *BackupManifest_DescriptorRevision) XXX_DiscardUnknown()

func (*BackupManifest_DescriptorRevision) XXX_Marshal Uses

func (m *BackupManifest_DescriptorRevision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackupManifest_DescriptorRevision) XXX_Merge Uses

func (dst *BackupManifest_DescriptorRevision) XXX_Merge(src proto.Message)

func (*BackupManifest_DescriptorRevision) XXX_Size Uses

func (m *BackupManifest_DescriptorRevision) XXX_Size() int

func (*BackupManifest_DescriptorRevision) XXX_Unmarshal Uses

func (m *BackupManifest_DescriptorRevision) XXX_Unmarshal(b []byte) error

type BackupManifest_File Uses

type BackupManifest_File struct {
    Span        roachpb.Span `protobuf:"bytes,1,opt,name=span,proto3" json:"span"`
    Path        string       `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
    Sha512      []byte       `protobuf:"bytes,4,opt,name=sha512,proto3" json:"sha512,omitempty"`
    EntryCounts RowCount     `protobuf:"bytes,6,opt,name=entry_counts,json=entryCounts,proto3" json:"entry_counts"`
    // StartTime 0 is sometimes legitimately used, so it is only meaningful if
    // EndTime is non-zero, otherwise both just inherit from containing backup.
    StartTime  hlc.Timestamp `protobuf:"bytes,7,opt,name=start_time,json=startTime,proto3" json:"start_time"`
    EndTime    hlc.Timestamp `protobuf:"bytes,8,opt,name=end_time,json=endTime,proto3" json:"end_time"`
    LocalityKV string        `protobuf:"bytes,9,opt,name=locality_kv,json=localityKv,proto3" json:"locality_kv,omitempty"`
}

BackupManifest_File represents a file that contains the diff for a key range between two timestamps.

func (*BackupManifest_File) Descriptor Uses

func (*BackupManifest_File) Descriptor() ([]byte, []int)

func (*BackupManifest_File) Marshal Uses

func (m *BackupManifest_File) Marshal() (dAtA []byte, err error)

func (*BackupManifest_File) MarshalTo Uses

func (m *BackupManifest_File) MarshalTo(dAtA []byte) (int, error)

func (*BackupManifest_File) ProtoMessage Uses

func (*BackupManifest_File) ProtoMessage()

func (*BackupManifest_File) Reset Uses

func (m *BackupManifest_File) Reset()

func (*BackupManifest_File) Size Uses

func (m *BackupManifest_File) Size() (n int)

func (*BackupManifest_File) String Uses

func (m *BackupManifest_File) String() string

func (*BackupManifest_File) Unmarshal Uses

func (m *BackupManifest_File) Unmarshal(dAtA []byte) error

func (*BackupManifest_File) XXX_DiscardUnknown Uses

func (m *BackupManifest_File) XXX_DiscardUnknown()

func (*BackupManifest_File) XXX_Marshal Uses

func (m *BackupManifest_File) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackupManifest_File) XXX_Merge Uses

func (dst *BackupManifest_File) XXX_Merge(src proto.Message)

func (*BackupManifest_File) XXX_Size Uses

func (m *BackupManifest_File) XXX_Size() int

func (*BackupManifest_File) XXX_Unmarshal Uses

func (m *BackupManifest_File) XXX_Unmarshal(b []byte) error

type BackupManifest_Progress Uses

type BackupManifest_Progress struct {
    Files        []BackupManifest_File `protobuf:"bytes,1,rep,name=files,proto3" json:"files"`
    RevStartTime hlc.Timestamp         `protobuf:"bytes,2,opt,name=rev_start_time,json=revStartTime,proto3" json:"rev_start_time"`
}

func (*BackupManifest_Progress) Descriptor Uses

func (*BackupManifest_Progress) Descriptor() ([]byte, []int)

func (*BackupManifest_Progress) Marshal Uses

func (m *BackupManifest_Progress) Marshal() (dAtA []byte, err error)

func (*BackupManifest_Progress) MarshalTo Uses

func (m *BackupManifest_Progress) MarshalTo(dAtA []byte) (int, error)

func (*BackupManifest_Progress) ProtoMessage Uses

func (*BackupManifest_Progress) ProtoMessage()

func (*BackupManifest_Progress) Reset Uses

func (m *BackupManifest_Progress) Reset()

func (*BackupManifest_Progress) Size Uses

func (m *BackupManifest_Progress) Size() (n int)

func (*BackupManifest_Progress) String Uses

func (m *BackupManifest_Progress) String() string

func (*BackupManifest_Progress) Unmarshal Uses

func (m *BackupManifest_Progress) Unmarshal(dAtA []byte) error

func (*BackupManifest_Progress) XXX_DiscardUnknown Uses

func (m *BackupManifest_Progress) XXX_DiscardUnknown()

func (*BackupManifest_Progress) XXX_Marshal Uses

func (m *BackupManifest_Progress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackupManifest_Progress) XXX_Merge Uses

func (dst *BackupManifest_Progress) XXX_Merge(src proto.Message)

func (*BackupManifest_Progress) XXX_Size Uses

func (m *BackupManifest_Progress) XXX_Size() int

func (*BackupManifest_Progress) XXX_Unmarshal Uses

func (m *BackupManifest_Progress) XXX_Unmarshal(b []byte) error

type BackupManifest_Tenant Uses

type BackupManifest_Tenant struct {
    ID   uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
    Info []byte `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
}

func (*BackupManifest_Tenant) Descriptor Uses

func (*BackupManifest_Tenant) Descriptor() ([]byte, []int)

func (*BackupManifest_Tenant) Marshal Uses

func (m *BackupManifest_Tenant) Marshal() (dAtA []byte, err error)

func (*BackupManifest_Tenant) MarshalTo Uses

func (m *BackupManifest_Tenant) MarshalTo(dAtA []byte) (int, error)

func (*BackupManifest_Tenant) ProtoMessage Uses

func (*BackupManifest_Tenant) ProtoMessage()

func (*BackupManifest_Tenant) Reset Uses

func (m *BackupManifest_Tenant) Reset()

func (*BackupManifest_Tenant) Size Uses

func (m *BackupManifest_Tenant) Size() (n int)

func (*BackupManifest_Tenant) String Uses

func (m *BackupManifest_Tenant) String() string

func (*BackupManifest_Tenant) Unmarshal Uses

func (m *BackupManifest_Tenant) Unmarshal(dAtA []byte) error

func (*BackupManifest_Tenant) XXX_DiscardUnknown Uses

func (m *BackupManifest_Tenant) XXX_DiscardUnknown()

func (*BackupManifest_Tenant) XXX_Marshal Uses

func (m *BackupManifest_Tenant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackupManifest_Tenant) XXX_Merge Uses

func (dst *BackupManifest_Tenant) XXX_Merge(src proto.Message)

func (*BackupManifest_Tenant) XXX_Size Uses

func (m *BackupManifest_Tenant) XXX_Size() int

func (*BackupManifest_Tenant) XXX_Unmarshal Uses

func (m *BackupManifest_Tenant) XXX_Unmarshal(b []byte) error

type BackupPartitionDescriptor Uses

type BackupPartitionDescriptor struct {
    LocalityKV string                                              `protobuf:"bytes,1,opt,name=locality_kv,json=localityKv,proto3" json:"locality_kv,omitempty"`
    Files      []BackupManifest_File                               `protobuf:"bytes,2,rep,name=files,proto3" json:"files"`
    BackupID   github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,3,opt,name=backup_id,json=backupId,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"backup_id"`
}

func (*BackupPartitionDescriptor) Descriptor Uses

func (*BackupPartitionDescriptor) Descriptor() ([]byte, []int)

func (*BackupPartitionDescriptor) Marshal Uses

func (m *BackupPartitionDescriptor) Marshal() (dAtA []byte, err error)

func (*BackupPartitionDescriptor) MarshalTo Uses

func (m *BackupPartitionDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*BackupPartitionDescriptor) ProtoMessage Uses

func (*BackupPartitionDescriptor) ProtoMessage()

func (*BackupPartitionDescriptor) Reset Uses

func (m *BackupPartitionDescriptor) Reset()

func (*BackupPartitionDescriptor) Size Uses

func (m *BackupPartitionDescriptor) Size() (n int)

func (*BackupPartitionDescriptor) String Uses

func (m *BackupPartitionDescriptor) String() string

func (*BackupPartitionDescriptor) Unmarshal Uses

func (m *BackupPartitionDescriptor) Unmarshal(dAtA []byte) error

func (*BackupPartitionDescriptor) XXX_DiscardUnknown Uses

func (m *BackupPartitionDescriptor) XXX_DiscardUnknown()

func (*BackupPartitionDescriptor) XXX_Marshal Uses

func (m *BackupPartitionDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackupPartitionDescriptor) XXX_Merge Uses

func (dst *BackupPartitionDescriptor) XXX_Merge(src proto.Message)

func (*BackupPartitionDescriptor) XXX_Size Uses

func (m *BackupPartitionDescriptor) XXX_Size() int

func (*BackupPartitionDescriptor) XXX_Unmarshal Uses

func (m *BackupPartitionDescriptor) XXX_Unmarshal(b []byte) error

type DescRewriteMap Uses

type DescRewriteMap map[descpb.ID]*jobspb.RestoreDetails_DescriptorRewrite

DescRewriteMap maps old descriptor IDs to new descriptor and parent IDs.

type EncryptionInfo Uses

type EncryptionInfo struct {
    Scheme EncryptionInfo_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=cockroach.ccl.backupccl.EncryptionInfo_Scheme" json:"scheme,omitempty"`
    Salt   []byte                `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"`
    // EncryptedDataKeyByKMSMasterKeyID is a mapping from the hashed master key
    // identifier of a KMS to the encrypted version of the DataKey obtained from
    // that KMS.
    EncryptedDataKeyByKMSMasterKeyID map[string][]byte `protobuf:"bytes,3,rep,name=encryptedDataKeyByKMSMasterKeyID,proto3" json:"encryptedDataKeyByKMSMasterKeyID,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

EncryptionInfo is stored IN PLAINTEXT along side collections of encrypted files stored outside of cockroach, for example by BACKUP/RESTORE.

func (*EncryptionInfo) Descriptor Uses

func (*EncryptionInfo) Descriptor() ([]byte, []int)

func (*EncryptionInfo) Equal Uses

func (this *EncryptionInfo) Equal(that interface{}) bool

func (*EncryptionInfo) Marshal Uses

func (m *EncryptionInfo) Marshal() (dAtA []byte, err error)

func (*EncryptionInfo) MarshalTo Uses

func (m *EncryptionInfo) MarshalTo(dAtA []byte) (int, error)

func (*EncryptionInfo) ProtoMessage Uses

func (*EncryptionInfo) ProtoMessage()

func (*EncryptionInfo) Reset Uses

func (m *EncryptionInfo) Reset()

func (*EncryptionInfo) Size Uses

func (m *EncryptionInfo) Size() (n int)

func (*EncryptionInfo) String Uses

func (m *EncryptionInfo) String() string

func (*EncryptionInfo) Unmarshal Uses

func (m *EncryptionInfo) Unmarshal(dAtA []byte) error

func (*EncryptionInfo) XXX_DiscardUnknown Uses

func (m *EncryptionInfo) XXX_DiscardUnknown()

func (*EncryptionInfo) XXX_Marshal Uses

func (m *EncryptionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EncryptionInfo) XXX_Merge Uses

func (dst *EncryptionInfo) XXX_Merge(src proto.Message)

func (*EncryptionInfo) XXX_Size Uses

func (m *EncryptionInfo) XXX_Size() int

func (*EncryptionInfo) XXX_Unmarshal Uses

func (m *EncryptionInfo) XXX_Unmarshal(b []byte) error

type EncryptionInfo_Scheme Uses

type EncryptionInfo_Scheme int32
const (
    EncryptionInfo_AES256GCM EncryptionInfo_Scheme = 0
)

func (EncryptionInfo_Scheme) EnumDescriptor Uses

func (EncryptionInfo_Scheme) EnumDescriptor() ([]byte, []int)

func (EncryptionInfo_Scheme) String Uses

func (x EncryptionInfo_Scheme) String() string

type MVCCFilter Uses

type MVCCFilter int32
const (
    MVCCFilter_Latest MVCCFilter = 0
    MVCCFilter_All    MVCCFilter = 1
)

func (MVCCFilter) EnumDescriptor Uses

func (MVCCFilter) EnumDescriptor() ([]byte, []int)

func (MVCCFilter) String Uses

func (x MVCCFilter) String() string

type RestoreProgress Uses

type RestoreProgress struct {
    Summary     RowCount     `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary"`
    ProgressIdx int64        `protobuf:"varint,2,opt,name=progressIdx,proto3" json:"progressIdx,omitempty"`
    DataSpan    roachpb.Span `protobuf:"bytes,3,opt,name=dataSpan,proto3" json:"dataSpan"`
}

RestoreProgress is the information that the RestoreData processor sends back to the restore coordinator to update the job progress.

func (*RestoreProgress) Descriptor Uses

func (*RestoreProgress) Descriptor() ([]byte, []int)

func (*RestoreProgress) Marshal Uses

func (m *RestoreProgress) Marshal() (dAtA []byte, err error)

func (*RestoreProgress) MarshalTo Uses

func (m *RestoreProgress) MarshalTo(dAtA []byte) (int, error)

func (*RestoreProgress) ProtoMessage Uses

func (*RestoreProgress) ProtoMessage()

func (*RestoreProgress) Reset Uses

func (m *RestoreProgress) Reset()

func (*RestoreProgress) Size Uses

func (m *RestoreProgress) Size() (n int)

func (*RestoreProgress) String Uses

func (m *RestoreProgress) String() string

func (*RestoreProgress) Unmarshal Uses

func (m *RestoreProgress) Unmarshal(dAtA []byte) error

func (*RestoreProgress) XXX_DiscardUnknown Uses

func (m *RestoreProgress) XXX_DiscardUnknown()

func (*RestoreProgress) XXX_Marshal Uses

func (m *RestoreProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RestoreProgress) XXX_Merge Uses

func (dst *RestoreProgress) XXX_Merge(src proto.Message)

func (*RestoreProgress) XXX_Size Uses

func (m *RestoreProgress) XXX_Size() int

func (*RestoreProgress) XXX_Unmarshal Uses

func (m *RestoreProgress) XXX_Unmarshal(b []byte) error

type RowCount Uses

type RowCount struct {
    DataSize     int64 `protobuf:"varint,1,opt,name=data_size,json=dataSize,proto3" json:"data_size,omitempty"`
    Rows         int64 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"`
    IndexEntries int64 `protobuf:"varint,3,opt,name=index_entries,json=indexEntries,proto3" json:"index_entries,omitempty"`
}

RowCount tracks the size and row/index entry counts.

func (*RowCount) Descriptor Uses

func (*RowCount) Descriptor() ([]byte, []int)

func (*RowCount) Marshal Uses

func (m *RowCount) Marshal() (dAtA []byte, err error)

func (*RowCount) MarshalTo Uses

func (m *RowCount) MarshalTo(dAtA []byte) (int, error)

func (*RowCount) ProtoMessage Uses

func (*RowCount) ProtoMessage()

func (*RowCount) Reset Uses

func (m *RowCount) Reset()

func (*RowCount) Size Uses

func (m *RowCount) Size() (n int)

func (*RowCount) String Uses

func (m *RowCount) String() string

func (*RowCount) Unmarshal Uses

func (m *RowCount) Unmarshal(dAtA []byte) error

func (*RowCount) XXX_DiscardUnknown Uses

func (m *RowCount) XXX_DiscardUnknown()

func (*RowCount) XXX_Marshal Uses

func (m *RowCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RowCount) XXX_Merge Uses

func (dst *RowCount) XXX_Merge(src proto.Message)

func (*RowCount) XXX_Size Uses

func (m *RowCount) XXX_Size() int

func (*RowCount) XXX_Unmarshal Uses

func (m *RowCount) XXX_Unmarshal(b []byte) error

type ScheduledBackupExecutionArgs Uses

type ScheduledBackupExecutionArgs struct {
    BackupType      ScheduledBackupExecutionArgs_BackupType `protobuf:"varint,1,opt,name=backup_type,json=backupType,proto3,enum=cockroach.ccl.backupccl.ScheduledBackupExecutionArgs_BackupType" json:"backup_type,omitempty"`
    BackupStatement string                                  `protobuf:"bytes,2,opt,name=backup_statement,json=backupStatement,proto3" json:"backup_statement,omitempty"`
}

ScheduledBackupExecutionArgs is the arguments to the scheduled backup executor.

func (*ScheduledBackupExecutionArgs) Descriptor Uses

func (*ScheduledBackupExecutionArgs) Descriptor() ([]byte, []int)

func (*ScheduledBackupExecutionArgs) Marshal Uses

func (m *ScheduledBackupExecutionArgs) Marshal() (dAtA []byte, err error)

func (*ScheduledBackupExecutionArgs) MarshalTo Uses

func (m *ScheduledBackupExecutionArgs) MarshalTo(dAtA []byte) (int, error)

func (*ScheduledBackupExecutionArgs) ProtoMessage Uses

func (*ScheduledBackupExecutionArgs) ProtoMessage()

func (*ScheduledBackupExecutionArgs) Reset Uses

func (m *ScheduledBackupExecutionArgs) Reset()

func (*ScheduledBackupExecutionArgs) Size Uses

func (m *ScheduledBackupExecutionArgs) Size() (n int)

func (*ScheduledBackupExecutionArgs) String Uses

func (m *ScheduledBackupExecutionArgs) String() string

func (*ScheduledBackupExecutionArgs) Unmarshal Uses

func (m *ScheduledBackupExecutionArgs) Unmarshal(dAtA []byte) error

func (*ScheduledBackupExecutionArgs) XXX_DiscardUnknown Uses

func (m *ScheduledBackupExecutionArgs) XXX_DiscardUnknown()

func (*ScheduledBackupExecutionArgs) XXX_Marshal Uses

func (m *ScheduledBackupExecutionArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ScheduledBackupExecutionArgs) XXX_Merge Uses

func (dst *ScheduledBackupExecutionArgs) XXX_Merge(src proto.Message)

func (*ScheduledBackupExecutionArgs) XXX_Size Uses

func (m *ScheduledBackupExecutionArgs) XXX_Size() int

func (*ScheduledBackupExecutionArgs) XXX_Unmarshal Uses

func (m *ScheduledBackupExecutionArgs) XXX_Unmarshal(b []byte) error

type ScheduledBackupExecutionArgs_BackupType Uses

type ScheduledBackupExecutionArgs_BackupType int32
const (
    ScheduledBackupExecutionArgs_FULL        ScheduledBackupExecutionArgs_BackupType = 0
    ScheduledBackupExecutionArgs_INCREMENTAL ScheduledBackupExecutionArgs_BackupType = 1
)

func (ScheduledBackupExecutionArgs_BackupType) EnumDescriptor Uses

func (ScheduledBackupExecutionArgs_BackupType) EnumDescriptor() ([]byte, []int)

func (ScheduledBackupExecutionArgs_BackupType) String Uses

func (x ScheduledBackupExecutionArgs_BackupType) String() string

type StatsTable Uses

type StatsTable struct {
    Statistics []*stats.TableStatisticProto `protobuf:"bytes,1,rep,name=statistics,proto3" json:"statistics,omitempty"`
}

In 20.2 and later, the Statistics object is stored separately from the backup manifest. StatsTables is a struct containing an array of sql.stats.TableStatisticProto object so that it can be easily marshaled into or unmarshaled from a file.

func (*StatsTable) Descriptor Uses

func (*StatsTable) Descriptor() ([]byte, []int)

func (*StatsTable) Marshal Uses

func (m *StatsTable) Marshal() (dAtA []byte, err error)

func (*StatsTable) MarshalTo Uses

func (m *StatsTable) MarshalTo(dAtA []byte) (int, error)

func (*StatsTable) ProtoMessage Uses

func (*StatsTable) ProtoMessage()

func (*StatsTable) Reset Uses

func (m *StatsTable) Reset()

func (*StatsTable) Size Uses

func (m *StatsTable) Size() (n int)

func (*StatsTable) String Uses

func (m *StatsTable) String() string

func (*StatsTable) Unmarshal Uses

func (m *StatsTable) Unmarshal(dAtA []byte) error

func (*StatsTable) XXX_DiscardUnknown Uses

func (m *StatsTable) XXX_DiscardUnknown()

func (*StatsTable) XXX_Marshal Uses

func (m *StatsTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatsTable) XXX_Merge Uses

func (dst *StatsTable) XXX_Merge(src proto.Message)

func (*StatsTable) XXX_Size Uses

func (m *StatsTable) XXX_Size() int

func (*StatsTable) XXX_Unmarshal Uses

func (m *StatsTable) XXX_Unmarshal(b []byte) error

Package backupccl imports 72 packages (graph) and is imported by 42 packages. Updated 2020-08-13. Refresh now. Tools for package owners.