github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/cmd/tools/read_index_ids/README.md (about)

     1  # read_index_ids
     2  
     3  `read_index_ids` is a utility to extract identifiers 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_index_ids
     9  $ ./bin/read_index_ids
    10  Usage: read_index_ids [-b value] [-n value] [-p value] [-s value] [parameters ...]
    11   -b, --block-start=value
    12         Block Start Time [in nsec]
    13   -n, --namespace=value
    14         Namespace [e.g. metrics]
    15   -p, --path-prefix=value
    16         Path prefix [e.g. /var/lib/m3db]
    17   -s, --shard=value
    18         Shard [expected format uint32]
    19  
    20  # example usage
    21  # read_index_ids -b1480960800000000000 -n metrics -p /var/lib/m3db -s 451 > /tmp/sample-index.out
    22  ```
    23  
    24  # TBH
    25  - The tool outputs the identifiers to `stdout`, remember to redirect as desired.
    26  - 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.