github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/cmd/tools/read_data_files/README.md (about) 1 # read_data_files 2 3 `read_data_files` is a utility to extract data for all timeseries' present in a TSDB file set. 4 5 # Usage 6 ``` 7 $ git clone git@github.com:m3db/m3.git 8 $ make read_data_files 9 $ ./bin/read_data_files 10 Usage: read_data_files [-B value] [-b value] [-f value] [-n value] [-p value] [-s value] [-t value] [-v value] [parameters ...] 11 -B, --benchmark=value 12 benchmark mode (optional), [series|datapoints] 13 -b, --block-start=value 14 Block Start Time [in nsec] 15 -f, --id-filter=value 16 ID Contains Filter (optional) 17 -n, --namespace=value 18 Namespace [e.g. metrics] 19 -p, --path-prefix=value 20 Path prefix [e.g. /var/lib/m3db] 21 -s, --shard=value Shard [expected format uint32], or -1 for all shards in the 22 directory 23 -t, --fileset-type=value 24 flush|snapshot 25 -v, --volume=value 26 Volume number 27 28 # example usage 29 # read_data_files -b1480960800000000000 -n metrics -p /var/lib/m3db -s 451 -f 'metric-name' > /tmp/sample-data.out 30 ``` 31 32 # TBH 33 - The tool outputs the identifiers to `stdout`, remember to redirect as desired. 34 - The code currently assumes the data layout under the hood is `<path-prefix>/data/<namespace>/<shard>/...<block-start>-[index|...].db`. If this is not the file structure under the hood, replicate it to use this tool. Remember to copy checkpoint files along with each index file.