influxdata / influxdata/influxdb

influx does not backup current shard

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

Description

I have a metrics database with this retention policy
SHOW RETENTION POLICIES ON metrics
```
name duration shardGroupDuration replicaN default
---- -------- ------------------ -------- -------
autogen 1440h0m0s 24h0m0s 1 true

SHOW SHARDS
...
5555 metrics autogen 5555 2021-08-04T00:00:00Z 2021-08-05T00:00:00Z 2021-10-04T00:00:00Z
5556 metrics autogen 5556 2021-08-05T00:00:00Z 2021-08-06T00:00:00Z 2021-10-05T00:00:00Z
```
when I use
```
influxd backup -portable -host remote_host:8088 /tmp/backup
```
i have the following problem:
influx does not backup current shard
```
4.0K 20210805T122805Z.s5556.tar.gz
```
but if I use
```
influxd backup -portable -database metrics -shard 5556 -host remote_host:8088 /tmp/backup
```
Everything is ok
```
441.5M 20210805T122805Z.s5556.tar.gz
```
and when I make a backup locally everything is ok too

__Expected behavior:__
influx backup current shard

__Actual behavior:__
influx does not backup current shard

__Environment info:__
InfluxDB v1.8.0 (git: 1.8 781490de48220d7695a05c29e5a36f550a4568f5)

Contributor guide

Open the contributing guide

Research direction

Reproduce the portable backup using the remote host and compare it with the explicit -database and -shard backup commands shown in the issue. Inspect the backup command's shard-selection behavior and verify that the current shard's archive contains its data; done means the default portable backup includes the current shard contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.