Finding all tablets of a database in YugabyteDB snapshots

Viewed 3
1 Answers

You can use yb-admin list_tables https://docs.yugabyte.com/preview/admin/yb-admin/#list-tables You’ll get an output like the following:

/yb-admin -master_addresses <master-ip-address:port>,<master-ip-address:port>,<master-ip-address:port> list_tablets ysql.northwind employee_territories 0
Tablet-UUID                             Range                                                           Leader-IP               Leader-UUID
2a2fd4c64c9c40518a0f185e236b6669        partition_key_start: "" partition_key_end: "\007\377"           ---------------------------------:9100  4e28b6addae349f0a05222b3f90ccc55
5990513fc6404b78bdcbf71205de1e89        partition_key_start: "\007\377" partition_key_end: "\017\376"   ---------------------------------:9100  4e28b6addae349f0a05222b3f90ccc55
….

And then you can check the Leader-IP to find on which node the leader-tablet data reside. You can also check or use this script: https://github.com/yugabyte/yugabyte-db/blob/master/managed/devops/bin/yb_backup.py

Related