Comments (10)
Hello!
Please, write output of these commands:
select create_table_query,partition_key,primary_key from system.tables where name='tmp_employee'
select * from system.parts where table='tmp_employee' limit 100
from clickhouse-backup.
Executing select statement together was throwing exception so I fired individually..
- select create_table_query from system.tables where name='tmp_employee';
┌─create_table_query──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ CREATE TABLE default.tmp_employee ( name String, age UInt32, joining_date Date, designation String) ENGINE = MergeTree() PARTITION BY toYYYYMM(joining_date) ORDER BY name SETTINGS index_granularity = 8192 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
- select partition_key from system.tables where name='tmp_employee';
- select primary_key from system.tables where name='tmp_employee';
Code: 47. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Unknown identifier: partition_key.
Code: 47. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Unknown identifier: primary_key.
- select * from system.parts where table='tmp_employee' limit 100
┌─partition─┬─name─────────┬─active─┬─marks─┬─marks_size─┬─rows─┬─bytes─┬───modification_time─┬─────────remove_time─┬─refcount─┬───min_date─┬───max_date─┬─min_block_number─┬─max_block_number─┬─level─┬─primary_key_bytes_in_memory─┬─primary_key_bytes_in_memory_allocated─┬─database─┬─table────────┬─engine────┬─path─────────────────────────────────────────────────────────┐
│ 199401 │ 199401_3_3_0 │ 1 │ 1 │ 64 │ 1 │ 716 │ 2019-05-01 14:28:13 │ 0000-00-00 00:00:00 │ 1 │ 1994-01-01 │ 1994-01-01 │ 3 │ 3 │ 0 │ 14 │ 4128 │ default │ tmp_employee │ MergeTree │ /motadata/clickhouse/data/default/tmp_employee/199401_3_3_0/ │
│ 201006 │ 201006_1_1_0 │ 1 │ 1 │ 64 │ 2 │ 730 │ 2019-05-01 14:28:13 │ 0000-00-00 00:00:00 │ 1 │ 2010-06-01 │ 2010-06-10 │ 1 │ 1 │ 0 │ 15 │ 4128 │ default │ tmp_employee │ MergeTree │ /motadata/clickhouse/data/default/tmp_employee/201006_1_1_0/ │
│ 201306 │ 201306_2_2_0 │ 1 │ 1 │ 64 │ 1 │ 711 │ 2019-05-01 14:28:13 │ 0000-00-00 00:00:00 │ 1 │ 2013-06-01 │ 2013-06-01 │ 2 │ 2 │ 0 │ 14 │ 4128 │ default │ tmp_employee │ MergeTree │ /motadata/clickhouse/data/default/tmp_employee/201306_2_2_0/ │
└───────────┴──────────────┴────────┴───────┴────────────┴──────┴───────┴─────────────────────┴─────────────────────┴──────────┴────────────┴────────────┴──────────────────┴──────────────────┴───────┴─────────────────────────────┴───────────────────────────────────────┴──────────┴──────────────┴───────────┴──────────────────────────────────────────────────────────────┘
3 rows in set. Elapsed: 0.023 sec.
I figured out the problem there isn't partition_id column in system.parts table but I don't know why , what could be the alternative of partition_id column ?
from clickhouse-backup.
What version of ClickHouse do you use?
from clickhouse-backup.
Here is every detail-
Details-
Ubuntu 16.04 LTS
Clickhouse version- 1.1.54370
Clickhouse-backup (latest 26Apr2019)
from clickhouse-backup.
This is very old version of ClickHouse. I have found out that clickhouse-backup works correctly since ClickHouse version 19.1.5 or above.
Can do you upgrade your clickhouse?
from clickhouse-backup.
Yes the version is quite old, for some reasons I cannot upgrade the clickhouse atleast for my current project, I was thinking of replacing partition_id with something else ,I am actually analysing columns for that do you have any suggestions which could be a possible replacement for partition_id?
from clickhouse-backup.
I did some modification in sql queries replaced partition_id with partition and accordingly modified ALTER queries but now I am stuck with some other error, is it ok to continue on this or so should I close this thread and start new one?
The error -
2019/05/02 20:46:00 Copy metadata
2019/05/02 20:46:00 can't backup metadata with stat /punshi/clickhouse/metadata: no such file or directory
I should say I have modified the config and I am trying to backup data of remote server. The above address does exist on remote machine for which I am taking backup but not on mine from where I am running the utility.
Thanks
from clickhouse-backup.
The error on copy metadata is a bug and it was fixed in v0.3.1
Thank you for report!
from clickhouse-backup.
It's possible to use partition instead of partiotion_id for old versions of ClickHouse but it requires code modification. I don't know when I can fix it.
from clickhouse-backup.
Well thanks for all this effort, I have modified the queries and its working partially I am stuck with some other error so I will close this ticket and raise another. If you want I can upload my changes once everything is working..
from clickhouse-backup.
Related Issues (20)
- custom TLS self-signed cert for S3 return error even when S3_DISABLE_CERT_VALIDATION=true HOT 7
- add flags --named-collections to create / restore / upload / download commands and option `named_collections_backup_always: false` to config
- Error during restore_remote operation: "can't create table test_db HOT 15
- custom List show zero result
- create pid file in /var/lib/clickhouse/backup/backup_name to avoid parallel work for the same backup even when allow_parallel: true
- change check_replicas_before_attach logic to allow log_pointer=1 HOT 1
- Logs of CLI commands should go to stderr? HOT 3
- unexpected packet 199 HOT 9
- Does zookepeer needs to br backed up seperately? HOT 1
- `LOG_LEVEL` not respected for `--environment-override`
- Restoring backup - Data only on node restored to HOT 6
- wrong resolve conflict for RBAC for complex multi line RBAC objects
- check exists access/.sql files during RBAC restore, not only SQL SELECT
- S3_OBJECT_DISK_PATH - option to disable in backup config HOT 4
- add fallback from `CopyObject` to copy stream for cross-region VPC endpoint or for incompatible object storage
- wrong `UpdateBackupMetrics` last backup calculation after startup when /tmp/.clickhouse-backup.cache.<S3> not exists
- error no have found schemas by * HOT 1
- What amount of space should be reserved for backup data for local and remote backups? HOT 1
- watch command not working for create_remote backup HOT 2
- Whether Huawei OBS is supported? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse-backup.