Documentation
¶
Index ¶
- func Chown(fPath string, ch *clickhouse.ClickHouse, disks []clickhouse.Disk, ...) error
- func HardlinkBackupPartsToStorage(backupName string, backupTable metadata.TableMetadata, disks []clickhouse.Disk, ...) error
- func HardlinkPart(srcPartPath, dstPartPath string) error
- func IsDuplicatedParts(part1, part2 string) error
- func IsFileInPartition(disk, fileName string, partitionsBackupMap common.EmptyMap) bool
- func IsPartInPartition(partName string, partitionsBackupMap common.EmptyMap) bool
- func IsSkipProjections(skipProjections []string, relativePath string) bool
- func LinkPartFromShadow(shadowPath, backupPartsPath, partName string, table *clickhouse.Table, ...) (int64, error)
- func Mkdir(name string, ch *clickhouse.ClickHouse, disks []clickhouse.Disk) error
- func MkdirAll(path string, ch *clickhouse.ClickHouse, disks []clickhouse.Disk) error
- func MoveShadowToBackup(shadowPath, backupPartsPath string, partitionsBackupMap common.EmptyMap, ...) ([]metadata.Part, int64, map[string]uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chown ¶
func Chown(fPath string, ch *clickhouse.ClickHouse, disks []clickhouse.Disk, recursive bool) error
Chown - set permission on path to clickhouse user This is necessary that the ClickHouse will be able to read parts files on restore
func HardlinkBackupPartsToStorage ¶
func HardlinkBackupPartsToStorage(backupName string, backupTable metadata.TableMetadata, disks []clickhouse.Disk, diskMap map[string]string, tableDataPaths, skipProjections []string, ch *clickhouse.ClickHouse, toDetached bool) error
HardlinkBackupPartsToStorage - copy partitions for specific table to detached folder
func HardlinkPart ¶ added in v2.8.3
HardlinkPart takes the snapshot of a part on a local disk the way ALTER TABLE FREEZE does: it hardlinks every file of srcPartPath into dstPartPath, keeping subdirectories (projections), without frozenPartExcludedFiles. dstPartPath, its missing parents and its subdirectories are created as the current user: MoveShadowToBackup recreates them in the backup anyway and the caller removes them with the snapshot. The shadow root above them is shared with clickhouse-server, the caller creates it with the owner the server expects, see backup.Backuper.prepareShadowDir. A missing srcPartPath is returned as a not-exist error, a file excluded from the snapshot which disappears between the directory listing and its stat is ignored
func IsDuplicatedParts ¶
func IsFileInPartition ¶
func IsPartInPartition ¶
func IsSkipProjections ¶ added in v2.6.6
func LinkPartFromShadow ¶ added in v2.7.0
func LinkPartFromShadow(shadowPath, backupPartsPath, partName string, table *clickhouse.Table, skipProjections []string, version int) (int64, error)
LinkPartFromShadow walks shadowPath and hard-links (or renames for older CH) every file that belongs to partName into backupPartsPath. Used to back up a part that was initially marked Required against --diff-from-remote by name but whose content fingerprint (hash_of_all_files / checksums) later turned out to differ from the diff source, so it must be uploaded locally instead.
func Mkdir ¶
func Mkdir(name string, ch *clickhouse.ClickHouse, disks []clickhouse.Disk) error
func MkdirAll ¶
func MkdirAll(path string, ch *clickhouse.ClickHouse, disks []clickhouse.Disk) error
func MoveShadowToBackup ¶ added in v2.5.0
func MoveShadowToBackup(shadowPath, backupPartsPath string, partitionsBackupMap common.EmptyMap, table *clickhouse.Table, tableDiffFromRemote metadata.TableMetadata, disk clickhouse.Disk, skipProjections []string, version int, computeChecksums bool) ([]metadata.Part, int64, map[string]uint64, error)
Types ¶
This section is empty.