influxdata / influxdata/influxdb

influx restore command fails

Open
#24,324 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__
1. Backup using
influx backup command
2. Upload files to the new host
3. Try to restore using :
influx restore backupFolder --full

__Expected behavior:__
restore all shards

__Actual behavior:__
partial data was restored

__Environment info:__

* System info: Darwin 22.3.0 arm64
* InfluxDB version: Influx CLI dev (git: none) build_date: 2023-04-28T14:24:22Z
* influx image:influxdb:2.7.1
* Other relevant environment details: Container runtime: docker

__Config:__
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=
- DOCKER_INFLUXDB_INIT_PASSWORD=
- DOCKER_INFLUXDB_INIT_ORG=
- DOCKER_INFLUXDB_INIT_BUCKET=
- DOCKER_INFLUXDB_INIT_RETENTION=48w
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=
- INFLUXD_QUERY_CONCURRENCY=15
- INFLUXD_QUERY_QUEUE_SIZE=200

__Logs:__
2023-07-17 14:46:54 ts=2023-07-17T11:46:54.971938Z lvl=info msg="loading changes (start)" log_id=0j4vZB1W000 service=storage-engine engine=tsm1 op_name="field indices" op_event=start
2023-07-17 14:46:54 ts=2023-07-17T11:46:54.971968Z lvl=info msg="loading changes (end)" log_id=0j4vZB1W000 service=storage-engine engine=tsm1 op_name="field indices" op_event=end op_elapsed=0.032ms
2023-07-17 14:46:54 ts=2023-07-17T11:46:54.981744Z lvl=info msg="Opened file" log_id=0j4vZB1W000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/2dce7a3f2155a10c/autogen/288/000000023-000000002.tsm id=0 duration=9.710ms
2023-07-17 14:46:56 ts=2023-07-17T11:46:56.678146Z lvl=warn msg="Error while freeing cold shard resources" log_id=0j4vZB1W000 service=storage-engine service=store error="engine is closed" db_shard_id=290
2023-07-17 14:46:56 ts=2023-07-17T11:46:56.714035Z lvl=info msg="index opened with 8 partitions" log_id=0j4vZB1W000 service=storage-engine index=tsi
2023-07-17 14:46:56 ts=2023-07-17T11:46:56.714308Z lvl=info msg="loading changes (start)" log_id=0j4vZB1W000 service=storage-engine engine=tsm1 op_name="field indices" op_event=start
2023-07-17 14:46:56 ts=2023-07-17T11:46:56.714328Z lvl=info msg="loading changes (end)" log_id=0j4vZB1W000 service=storage-engine engine=tsm1 op_name="field indices" op_event=end op_elapsed=0.021ms
2023-07-17 14:46:56 ts=2023-07-17T11:46:56.731134Z lvl=info msg="Opened file" log_id=0j4vZB1W000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/2dce7a3f2155a10c/autogen/290/000000053-000000002.tsm id=0 duration=16.722ms

Contributor guide

Open the contributing guide

Research direction

Start with the `influx restore backupFolder --full` command and reproduce the report using the stated backup and Docker environment. Compare the backed-up shards with the restored data and trace the restore entry point to identify where shards are skipped. Done means a full restore brings back all shards, with coverage for this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.