Get desktop application:
View/edit binary Protocol Buffers messages
The I/O rate limit for backup request.
The concurrency for executing the backup request in every tikv node.
If raw kv mode is enabled, `start_version` and `end_version` will be ignored, and `cf` specifies which cf to backup.
algorithm used for compress sst files
sst compression level, some algorithms support negative compression levels
The cipher_info is Used to encrypt sst
dst_api_version indicates the key-value encoding version used by the generated SST file. Accepted values: 1. "v1": the generated SST files are encoded with api-v1, can be restored to TiKV clusters whose api version is set to v1. 2. "v2": the generated SST files are encoded with api-v2, can be restored to TiKV clusters whose api version is set to v2.
with checkpoint, some subintervals of the range have been backed up and recorded. only the remaining sub ranges of the range need to be backed up this time.
only ranges in the same groups can be merged into one SST file. the ranges in each groups are sorted.
replica_read indicates whether to use replica read for backup. If it is false, the backup will only read data from leader. If it is true, the backup will read data from both leader and follower.
unique_id represents the handle of this backup. after we implement file-copy backup. we need generate some internal states during the whole backup precedure. this unique id is help to find the state effictively.
API version implies the encode of the key and value.
CheckPendingAdminOp used for snapshot backup. before we start snapshot for a TiKV. we need stop all schedule first and make sure all in-flight schedule has finished. this rpc check all pending conf change for leader.
(message has no fields)
PrepareSnapshotBackup is an advanced version of preparing snapshot backup. Check the defination of `PrepareSnapshotBackupRequest` for more.
The type of the request.
The regions related to the request. If the request is "UpdateLease" or "Finish", it should be empty.
The lease duration for "UpdateLease" request.
The type of the event.
The region bind to the type. For "WaitApplyDone".
The error of the execution.
Whether the last lease is valid. For "UpdateLease" and "Finish".
prepare is used for file-copy backup. before we start the backup for a TiKV. we need invoke this function to generate the SST files map. or we get nothing to backup.
whether save state to the storage.
unique_id represents the unique handle of the whole backup predecure. if unique_id = 0 means prepare failed. if unique_id > 0 means prepare success and all states saved with this unique info.
cleanup used for file-copy backup. after we finish the backup for a TiKV. we need clean some internel state. e.g. checkpoint, SST File maps
unique_id represents the unique handle of the whole backup predecure. it generated in prepare request and corrosponed to one specific backup.
ExternalStorage is a service for using a cloud backend from StorageBackend to store files. This can be used to backup and restore SST files.
Restore to a file
(message has no fields)
Save a file to storage
(message has no fields)
AzureBlobStorage storage backend saves files into azure blob storage.
Used in:
Alias: container
Notice: prefix starts without `/`, otherwise the first directory's name is empty.
Alias: access_tier. See https://docs.microsoft.com/en-us/azure/storage/blobs/access-tiers-overview
if empty, try to read account_name from the node's environment variable $AZURE_STORAGE_ACCOUNT.
There are 3 kinds of credentials, and the priority order is `SAS > Shared key > Azure AD (env) > Shared key (env)`. 1. Use shared key to access the azure blob If the node's environment variables($AZURE_CLIENT_ID, $AZURE_TENANT_ID, $AZURE_CLIENT_SECRET) exist, prefer to use token to access the azure blob. See https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key Otherwise, if empty, try to read shared key from the node's environment variable $AZURE_STORAGE_KEY.
2. Use Azure AD (Azure Active Directory) to access the azure blob See https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-azure-active-directory The Azure AD would generate the token, which tasks some time. So it is not recommanded to generate the token in each request. // AzureActiveDirectory azure_ad = #; 3. Use SAS (shared access signature) See https://learn.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature
Server Side Encryption, 2 types in total: 1. Specify an encryption scope for uploaded blobs. See https://learn.microsoft.com/en-us/azure/storage/blobs/encryption-scope-manage?tabs=powershell#upload-a-blob-with-an-encryption-scope
2. Provide an encryption key on a request to blob storage. See https://learn.microsoft.com/en-us/azure/storage/blobs/encryption-customer-provided-keys
The encryption algorithm must be AES256.
Used in:
A Base64-encoded AES-256 encryption key value.
The Base64-encoded SHA256 of the encryption key.
The message save the metadata of a backup.
ID and version of backuped cluster.
Save the version of BR running backup jobs.
The backupmeta scheme version.
A set of files that compose a backup. Note: `files` is deprecated, as it bloats backupmeta. It is kept for compatibility, so new BR can restore older backups.
An index to files contains data files.
A pair of timestamp specifies a time range of a backup. For full backup, the start_version equals to the end_version, it means point in time. For incremental backup, the time range is specified as (start_version, end_version].
Table metadata describes database and table info. Note: `schemas` is deprecated, as it bloats backupmeta. It is kept for compatibility, so new BR can restore older backups.
An index to files contains Schemas.
If in raw kv mode, `start_versions`, `end_versions` and `schemas` will be ignored, and the backup data's range is represented by raw_ranges.
Note: `raw_ranges` is deprecated, as it bloats backupmeta. It is kept for compatibility, so new BR can restore older backups.
An index to files contains RawRanges.
In incremental backup, DDLs which are completed in (lastBackupTS, backupTS] will be stored here. Note: `raw_ranges` is deprecated, as it bloats backupmeta. It is kept for compatibility, so new BR can restore older backups.
An index to files contains DDLs.
the backup result into `backupmeta` file
API version implies the encode of the key and value.
the placement policy info in backup cluster. we assume the policy won't be too much for one cluster.
new_collations_enabled specifies the config `new_collations_enabled_on_first_bootstrap` in tidb.
If in txn kv mode, `schemas` will be ignored, the backup data's range is as same as normal backup.
maintain the id mapping from upstream cluster to downstream cluster.
record the backup range and the correspond SST files when using file-copy backup.
record the size of the backup data files and meta files
BackupMpde represents the mode of this whole backup request to the cluster. and we need to store it in `backupmeta`.
Used in:
,scan and generate precise SST file of a backup range. then we don't need to do anything in future restore. Note: this mode will cost the CPU resource of TiKV.
check and upload the coarse overlap SST files of a backup range. then we need to use a merge iterator to filter unexpected kv in future restore. Note: this mode will save the CPU resource of TiKV.
Used in:
,Used in:
Used in:
, , ,CloudDynamic allows testing new cloud providers and new fields without changing protobuf definitions
Used in:
s3, gcs and azureBlobStorage are supported
Used in:
sst files or log files compression algorithm for log files, unknown means not use compression algorithm
Used in:
, , ,DataFileGroup is the merged file info in log-backup
Used in:
Path of the file.
Partitions of the file.
/ Below are extra information of the file, for better filtering files. The min ts of the keys in the file.
The max ts of the keys in the file.
The resolved ts of the region when saving the file.
The file length after compressed.
Used in:
,Checksum of the plaintext file, i.e., pre-compression, pre-encryption.
Path of the file.
/ Below are extra information of the file, for better filtering files. The min ts of the keys in the file.
The max ts of the keys in the file.
The resolved ts of the region when saving the file.
The region of the file.
The key range of the file. Encoded and starts with 'z'(internal key).
The column family of the file.
The operation type of the file.
Whether the data file contains meta keys(m prefixed keys) only.
The table ID of the file contains, when `is_meta` is true, would be ignored.
The file length.
The minimal begin ts in default cf if this file is write cf.
Offset of the partition. compatible with V1 and V2.
The range length of the merged file, if it exists.
The compression type for the file.
The CRC64XOR of all contents of the file. In older versions, this might be empty.
The original region range the log file belongs to. In older versions, this might be empty. This may not be accurative: file may contain keys less than this.
The original region range the log file belongs to. In older versions, this might be empty. This may not be accurative: file may contain keys greater than this.
The region epoch that the log file belongs to. In older versions, this might be empty. If a region get split or merged during observing, the file may contain multi epoches. This may not be complete: file may contain records from other versions. If there is exactly one epoch, `region_start_key` and `region_end_key` must match this epoch.
Encryption information of this data file, not set if plaintext.
An extended version of `SpansOfFile`, added more metadata for the execution of delayed deletion.
Used in:
This is a hint for garbage collecting. So we can easily check whether a set of spans consists the whole file.
Used in:
, , ,Used in:
, , , , ,recorded the total statistics across multiple tables
recorded when the SST kvs are from different tables
cipher_iv is used for AES cipher
Used in:
,GCS storage backend saves files into google cloud storage.
Used in:
If not empty, applies a predefined set of access controls. See https://cloud.google.com/storage/docs/access-control/lists#predefined-acl for valid values.
Service Account Credentials JSON blob You can get one from https://console.cloud.google.com/apis/credentials, and copy the content, set it as string here.
HDFS storage backend saves file into HDFS compatible storages
Used in:
a URL: hdfs:///some/path or hdfs://host:port/some/path
Used in:
,IngestedSSTs is created by a client that wants to put data to the cluster by `Ingest` APIs, these write cannot be directly recorded by log backup. The client should put a migration that contains the SSTs it uploaded.
The table IDs rewritten during restoring.
The SST files restored.
Treating the whole batch of SSTs as an huge atomic write as this timestamp. That is, when user wants to PiTR to sometime after this, everything restored will present after the PiTR. Otherwise nothing will present.
The hint of the common prefix of the files. Used for speed up garbage collecting.
Whether this batch have finished. If not, `as_if_ts` should be ignored and this should only be restored when there is a finished backup with the same `backup_uuid`.
When checkpoint enabled, one restoration may be separated to many of `IngestedSST`s. `IngestedSST`s sharing the same UUID should be treated as one. That is: - The `as_if_ts` should be the largest one among all finished ingested SST batches. - When restoring, all batches sharing the same uuid should be restored or not.
Local storage backend saves files into local disk
Used in:
Used in:
The selector of compaction source. Files contains ANY record greater than this (and less than `until_ts`) will be selected. The source and artificats may contain records out of the `from_ts` and `until_ts` range. When restoring, please use `input_min_ts` to filter out not needed compactions instead.
The selector of compaction source. Files contains ANY record less than this (and not less than `from_ts`) will be selected. The source and artificats may contain records out of the `from_ts` and `until_ts` range. When restoring, please use `input_max_ts` to filter out not needed compactions instead.
The user provided name for the compaction.
The statistics or other useful information for human.
relative path to the generated subcompaction metas. ("artificates")
the XOR of all artificate's hash.
relative path to the subcompaction generated SST files. this is a hint for garbage-collecting, so we don't need to read the metas one by one. Those SSTs cannot be directly used, what you need is probably in `artificates`.
The smallest TS of record contained among all selected files of this compaction.
The largest TS of record contained among all selected files of this compaction.
A subcompaction from a compaction. Subcompactions are actions that collect then sort key values from one region.
Used in:
The metadata of the subcompaction.
The generated SSTs.
The hint for the history of the region that contains the keys being compacted. This may be helpful for splitting, but it does not guarantee completeness and accuracy.
Used in:
The whole size of this subcompaction. It should be the physical size of all input logs.
The region that we perform the subcompaction.
The whole compaction's configure.
The key range of the input logs. They are encoded user key. (i.e. mem-comparable, no 'z' prefix)
The largest key from the input.
The type of operations in the file. (Write or Delete)
The input log files of this.
Batched version of `LogFileSubcompaction`. So we can store many subcompactions to one file, to reduce the number of file.
Used in:
Used in:
Path to the meta file.
Delete the physical files (MetaFileGroup) in the meta file.
Delete the logical files (MetaFileInfo) in the meta file. Note: Even the operation have been performed in the meta, this modification should be kept as long as the corresponding physical file not deleted. Or we may cannot know when to delete the physical file. Then the file will be leak until truncated.
Whether to delete the metadata itself.
MetaFile describes a multi-level index of data used in backup.
Used in:
A set of files that contains a MetaFile. It is used as a multi-level index.
A set of files that contains user data.
A set of files that contains Schemas.
A set of files that contains RawRanges.
A set of files that contains BackupRanges.
A set of files that contains DDLs.
Used in:
deprecated after(in) v6.3.0 TiKV cluster
Delete all files matches this prefix.
The ingested SSTs. It is mutable during restoring, hence a reference.
Used in:
The initial version. Somehow "UNKNOWN".
Added `creator` and `version`.
Added `ingested_sst_paths`.
Noop storage backend saves files into void.
Used in:
(message has no fields)
Used in:
whether this db has been filtered out
Used in:
whether this table has been filtered out
Used in:
Used in:
A region has finished wait apply.
A lease has been updated.
Used in:
Update the lease of suspending some commands (Which may impact the disk snapshot backup) to be proposed. As long as the lease is kept, those commands may not be proposed. If the client has gone, the lease will be destroyed after its TTL.
Wait a region apply to the last index.
Hint before closing the stream. Server will go back to normal after this. This should also return a final "UpdateLeaseResult" to the client, which indices whether the last lease is valid.
Used in:
,You may get region id from `LogFileSubcompactionMeta`.
Used in:
The left boundary of the region of this epoch. It is an byte-comparable encoded key without TS.
The right boundary of the region of the epoch.
The region epoch.
RewrittenTableID records a sort of modification over the SSTs during restoring. When "backing up" this "restored" SST, we want to backup the original SST before any rewrite. But in some cases, SSTs are not restored "as is", TiKV may rewrite or truncate its content by the client's request.
Used in:
The table ID in the backup data.
The rewritten table ID during restoring.
S3 storage backend saves files into S3 compatible storages For non-aws providers, endpoint must be provided
Used in:
server side encryption
Used in:
,stats represents the dump stats for a analyzed table, which generate by DumpStatsToJSON https://github.com/pingcap/tidb/blob/e136429d8dc5d70f43cd3f94179b0b9f47595097/statistics/handle/dump.go#L116
An index of files that contains stats data
Used in:
Used in:
,Used in:
Used in:
The physical id which the stats json data belongs to.
The marshal data of the part of json_table. Currently it is the partition table.
A set of files that contains json_tables.
Used in:
the size of the file content encrypted
the size of the original file content
cipher_iv is used for AES cipher
If the size of the stats is very small, save the data into the metafile
Used in:
, , , , ,the unix epoch time (in millisecs) of the time the error reported.
the unified error code of the error.
the user-friendly error message.
the store id of who issues the error.
The storage for backup, parsed by BR.
The time range for backing up.
Misc meta data. The name of the task, also the ID of the task.
The table filter of the task. Only for displaying the task info.
compression type
security config for backup files
Used in:
not recommended in production. configure KMS based or locally managed master key instead in TiKV StreamBackupConfig
The message saves the physical table checksum
Used in:
physical id is either table id or partition id