Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore to new server with different disk count, implements least_used for normal disk and roud_robin for Object disks #561

Closed
vkrot-innio opened this issue Nov 9, 2022 · 4 comments
Assignees
Milestone

Comments

@vkrot-innio
Copy link

There is disk_mapping already, but looks like it can remap disks 1-1. I want to restore a backup at a system that has more disks and distribute parts between the disks. Backup server had only 1 "default" disk, new server has 7 disks. Is that possible and how?

@Slach
Copy link
Collaborator

Slach commented Nov 17, 2022

sorry for late reply

currently it is not possible automatically

you can manually spread parts
move some /var/lib/clickhouse/backup/backup_name/shadow/db/table/<disk_name>/<part_name>.<archive_extension>
to /other/disk/path/backup/backup_name/shadow/db/table/<new_disk_name>/<part_name>.<archive_extension>
and changing /var/lib/clickhouse/backup/backup_name/metadata/db/table.json "parts" section
and try to restore

this is good candidate for feature request, but need formalize how to spread parts between disks
and have lot of corner cases when we have s3 disks

@Slach Slach self-assigned this Nov 17, 2022
@Slach Slach added this to the 2.2.0 milestone Nov 17, 2022
@Slach
Copy link
Collaborator

Slach commented Mar 16, 2023

Unfortunately, too many corner cases for multi-disk volumes, different storage policies and S3 \ HDFS disks and backwards compatibility, currently we doesn't store inside backup_name/metadata.json full information for volumes, storage_policies and disk types

Need time to think how to implements it properly

@Slach Slach modified the milestones: 2.2.0, 2.3.0 Mar 16, 2023
@Slach Slach modified the milestones: 2.3.0, 2.4.0 Jun 14, 2023
@Slach Slach changed the title Restore to new server with more disks? Restore to new server with different storage policy, different disk count, implements least_used for normal disk and roud_robin for Object disks Aug 4, 2023
@Slach Slach changed the title Restore to new server with different storage policy, different disk count, implements least_used for normal disk and roud_robin for Object disks Restore to new server with different disk count, implements least_used for normal disk and roud_robin for Object disks Aug 14, 2023
@Slach
Copy link
Collaborator

Slach commented Aug 14, 2023

Unfortunately, fair full implementation requires store data part size and requires rewrite too many parts

I added a partial implementation, which could cover 60-70 percent of use-cases, I hope

@Slach Slach closed this as completed in 20e250c Aug 14, 2023
@Slach Slach reopened this Aug 28, 2023
@Slach Slach modified the milestones: 2.4.0, 2.5.0 Aug 28, 2023
@Slach Slach closed this as completed in 11eee29 Aug 28, 2023
@Slach Slach reopened this Aug 28, 2023
minguyen9988 added a commit to minguyen9988/clickhouse-backup that referenced this issue Sep 28, 2023
* add connection to gcs and use different context for upload incase it got cancel by another thread

* save

* keep ctx

* keep ctx

* use v2

* change to GCS_CLIENT_POOL_SIZE

* pin zookeeper to 3.8.2 version for resolve incompatibility between clickhouse and zookeeper 3.9.0, see details in apache/zookeeper#1837 (comment) return `:latest` default value after resolve ClickHouse/ClickHouse#53749

* Revert "add more precise disk re-balancing for not exists disks, during download, partial fix Altinity#561"

This reverts commit 20e250c.

* fix S3 head object Server Side Encryption parameters, fix Altinity#709

* change timeout to 60m, TODO make tests Parallel

---------

Co-authored-by: Slach <bloodjazman@gmail.com>
@Slach
Copy link
Collaborator

Slach commented Feb 1, 2024

=(( too hard to implements with combination with object disks ...

@Slach Slach modified the milestones: 2.5.0, 2.6.0 Feb 1, 2024
Slach added a commit that referenced this issue Feb 5, 2024
… by prefix instead of reading metadata files, applying macros for `object_disks_path`, related to #561
@Slach Slach closed this as completed in cf4dcd7 Feb 5, 2024
@Slach Slach modified the milestones: 2.5.0, 2.4.26 Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants