Join us on YugabyteDB Community Slack
Star us on
Get Started
Slack
GitHub
Get Started
v2.13 (latest) v2.12 (stable) v2.8 (earlier version) v2.6 (earlier version) v2.4 (earlier version) v2.2 (earlier version) v2.1 (earlier version) v2.0 (earlier version) v1.3 (earlier version)
  • YUGABYTEDB CORE
    • Quick start
      • 1. Install YugabyteDB
      • 2. Create a local cluster
      • 3. Explore distributed SQL
      • 4. Build an application
        • Java
        • Node.js
        • Go
        • Python
        • Ruby
        • C#
        • PHP
        • C++
        • C
        • Scala
    • Explore
      • SQL features
        • Schemas and Tables
        • Data Types
        • Data Manipulation
        • Queries and Joins
        • Expressions and Operators
        • Stored Procedures
        • Triggers
        • Advanced features
          • Cursors
          • Table Partitioning
          • Views
          • Savepoints
          • Collations
          • Extensions
        • Going beyond SQL
          • Follower reads
          • Tablespaces
      • Fault tolerance
      • Horizontal scalability
        • Scaling Transactions
        • Sharding Data
      • Transactions
        • Distributed Transactions
        • Isolation Levels
        • Explicit Locking
      • Indexes and Constraints
        • Overview
        • Unique Indexes
        • Partial Indexes
        • Expression Indexes
        • Generalized Inverted Indexes
        • Primary Key
        • Foreign Key
        • Other Constraints
      • JSON support
      • Multi-region deployments
        • Sync replication (3+ regions)
        • Async Replication (2+ regions)
        • Row-Level Geo-Partitioning
        • Read replicas
      • Query tuning
        • Introduction
        • Get query statistics using pg_stat_statements
        • Viewing live queries with pg_stat_activity
        • Analyzing queries with EXPLAIN
        • Optimizing YSQL queries using pg_hint_plan
      • Cluster management
        • Point-in-time recovery
      • Security
      • Observability
        • Prometheus Integration
        • Grafana Dashboard
    • Develop
      • Learn app development
        • 1. SQL vs NoSQL
        • 2. Data modeling
        • 3. Data types
        • 4. ACID transactions
        • 5. Aggregations
        • 6. Batch operations
        • 7. Date and time
        • 8. Strings and text
        • 9. TTL for data expiration
      • Real-world examples
        • E-Commerce app
        • IoT fleet management
      • Explore sample apps
      • Best practices
      • Cloud-native development
        • Codespaces
        • Gitpod
    • Migrate
      • Migration process overview
      • Migrate from PostgreSQL
        • Convert a PostgreSQL schema
        • Migrate a PostgreSQL application
        • Export PostgreSQL data
        • Prepare a cluster
        • Import PostgreSQL data
        • Verify Migration
    • Deploy
      • Deployment checklist
      • Manual deployment
        • 1. System configuration
        • 2. Install software
        • 3. Start YB-Masters
        • 4. Start YB-TServers
        • 5. Verify deployment
      • Kubernetes
        • Single-zone
          • Open Source
          • Amazon EKS
          • Google Kubernetes Engine
          • Azure Kubernetes Service
        • Multi-zone
          • Amazon EKS
          • Google Kubernetes Engine
        • Multi-cluster
          • Google Kubernetes Engine
        • Best practices
        • Connect Clients
      • Docker
      • Public clouds
        • Amazon Web Services
        • Google Cloud Platform
        • Microsoft Azure
      • Multi-DC deployments
        • Three+ data center (3DC)
        • Asynchronous Replication
        • Read replica clusters
    • Benchmark
      • TPC-C
      • sysbench
      • YCSB
      • Key-value workload
      • Large datasets
      • Scalability
        • Scaling queries
      • Resilience
        • Jepsen testing
      • Performance Troubleshooting
    • Secure
      • Security checklist
      • Enable Authentication
        • Enable User Authentication
        • Configure ysql_hba_conf_csv
      • Authentication Methods
        • Password Authentication
        • LDAP Authentication
        • Host-Based Authentication
        • Trust Authentication
      • Role-Based Access Control
        • Overview
        • Manage Users and Roles
        • Grant Privileges
        • Row-Level Security (RLS)
        • Column-Level Security
      • Encryption in Transit
        • Create server certificates
        • Enable server-to-server encryption
        • Enable client-to-server encryption
        • Connect to Clusters
        • TLS and authentication
      • Encryption at rest
      • Column-level encryption
      • Audit Logging
        • Configure Audit Logging
        • Session-Level Audit Logging
        • Object-Level Audit Logging
      • Vulnerability disclosure policy
    • Manage
      • Back up and restore
        • Back up data
        • Restore data
        • Point-in-time recovery
        • Snapshot and restore data
      • Migrate data
        • Bulk import
        • Bulk export
      • Change cluster configuration
      • Diagnostics reporting
      • Upgrade a deployment
      • Grow cluster
    • Troubleshoot
      • Troubleshooting
      • Cluster level issues
        • YCQL connection issues
        • YEDIS connection Issues
        • Recover tserver/master
        • Replace a failed YB-TServer
        • Replace a failed YB-Master
        • Manual remote bootstrap when a majority of peers fail
      • Node level issues
        • Check servers
        • Inspect logs
        • System statistics
        • Disk failure
        • Common error messages
    • Contribute
      • Core database
        • Contribution checklist
        • Build the source
        • Configure a CLion project
        • Run the tests
        • Coding style
  • YUGABYTE PLATFORM
    • Overview
      • Install
      • Configure
    • Install Yugabyte Platform
      • Prerequisites
      • Prepare the environment
      • Install software
      • Prepare nodes (on-prem)
      • Uninstall software
    • Configure Yugabyte Platform
      • Create admin user
      • Configure the cloud provider
      • Configure the backup target
      • Configure alerts
    • Create deployments
      • Multi-zone universe
      • Multi-region universe
      • Multi-cloud universe
      • Read replica cluster
      • Asynchronous replication
    • Manage deployments
      • Start and stop processes
      • Add a node
      • Eliminate an unresponsive node
      • Enable high availability
      • Edit configuration flags
      • Edit a universe
      • Delete a universe
      • Configure instance tags
      • Upgrade YugabyteDB software
      • Migrate to Helm 3
    • Back up universes
      • Configure backup storage
      • Back up universe data
      • Restore universe data
      • Schedule data backups
    • Security
      • Security checklist
      • Customize ports
      • LDAP authentication
      • Authorization platform
      • Create a KMS configuration
      • Enable encryption at rest
      • Enable encryption in transit (TLS)
      • Network security
    • Alerts and monitoring
      • Alerts
      • Live Queries dashboard
      • Slow Queries dashboard
    • Troubleshoot
      • Install and upgrade issues
      • Universe issues
    • Administer Yugabyte Platform
      • Back Up Yugabyte Platform
      • Authenticate with LDAP
    • Upgrade Yugabyte Platform
      • Upgrade using Replicated
  • YUGABYTE CLOUD
    • Overview
    • Quick start
      • Create a free cluster
      • Connect to the cluster
      • Create a database
      • Explore distributed SQL
      • Build an application
        • Before you begin
        • Java
        • Go
        • Python
        • Node.js
        • C
        • C++
        • C#
        • Ruby
        • Rust
        • PHP
    • Deploy clusters
      • Planning a cluster
      • Create a free cluster
      • Create a standard cluster
      • VPC network
        • Overview
        • Set up a VPC network
        • VPCs
        • Peering Connections
    • Secure clusters
      • IP allow lists
      • Database authorization
      • Add database users
      • Encryption in transit
      • Audit cloud activity
    • Connect to clusters
      • Cloud Shell
      • Client shell
      • Connect applications
    • Alerts and monitoring
      • Alerts
      • Performance metrics
      • Live queries
      • Slow YSQL queries
      • Cluster activity
    • Manage clusters
      • Backup and restore
      • Scale and configure clusters
      • Create extensions
    • Administer Yugabyte Cloud
      • Manage cloud users
      • Manage billing
      • Cluster costs
    • Example applications
      • Connect a Spring application
      • Connect a YCQL Java application
      • Hasura Cloud
      • Deploy a GraphQL application
    • Security architecture
      • Security architecture
      • Shared responsibility model
    • Troubleshoot
    • Yugabyte Cloud FAQ
    • What's new
  • INTEGRATIONS
    • Apache Kafka
    • Apache Spark
    • JanusGraph
    • KairosDB
    • Presto
    • Metabase
    • WSO2 Identity Server
    • YSQL Loader
    • Yugabyte JDBC Driver
    • Prisma
    • Hasura
      • Application Development
      • Benchmarking
    • Spring Framework
      • Spring Data YugabyteDB
      • Spring Data Cassandra
    • Flyway
    • GORM
    • Liquibase
    • Sequelize
    • SQLAlchemy
    • Entity Framework
    • Django REST framework
  • REFERENCE
    • Architecture
      • Design goals
      • Key concepts
        • Universe
        • YB-TServer Service
        • YB-Master Service
      • Core functions
        • Universe creation
        • Table creation
        • Write IO path
        • Read IO path
        • High availability
      • Layered architecture
      • Query layer
        • Overview
      • DocDB transactions layer
        • Transactions overview
        • Transaction isolation levels
        • Explicit locking
        • Read Committed
        • Single-row transactions
        • Distributed transactions
        • Transactional IO path
      • DocDB sharding layer
        • Hash & range sharding
        • Tablet splitting
        • Colocated tables
      • DocDB replication layer
        • Replication
        • xCluster replication
        • Read replicas
        • Change data capture (CDC)
      • DocDB storage layer
        • Persistence
        • Performance
    • APIs
      • YSQL
        • The SQL language
          • SQL statements
            • ABORT
            • ALTER DATABASE
            • ALTER DEFAULT PRIVILEGES
            • ALTER DOMAIN
            • ALTER GROUP
            • ALTER POLICY
            • ALTER ROLE
            • ALTER SEQUENCE
            • ALTER TABLE
            • ALTER USER
            • ANALYZE
            • BEGIN
            • CALL
            • COMMENT
            • COMMIT
            • COPY
            • CREATE AGGREGATE
            • CREATE CAST
            • CREATE DATABASE
            • CREATE DOMAIN
            • CREATE EXTENSION
            • CREATE FUNCTION
            • CREATE GROUP
            • CREATE INDEX
            • CREATE MATERIALIZED VIEW
            • CREATE OPERATOR
            • CREATE OPERATOR CLASS
            • CREATE POLICY
            • CREATE PROCEDURE
            • CREATE ROLE
            • CREATE RULE
            • CREATE SCHEMA
            • CREATE SEQUENCE
            • CREATE TABLE
            • CREATE TABLE AS
            • CREATE TRIGGER
            • CREATE TYPE
            • CREATE USER
            • CREATE VIEW
            • DEALLOCATE
            • DELETE
            • DO
            • DROP AGGREGATE
            • DROP CAST
            • DROP DATABASE
            • DROP DOMAIN
            • DROP EXTENSION
            • DROP FUNCTION
            • DROP GROUP
            • DROP MATERIALIZED VIEW
            • DROP OPERATOR
            • DROP OPERATOR CLASS
            • DROP OWNED
            • DROP POLICY
            • DROP PROCEDURE
            • DROP ROLE
            • DROP RULE
            • DROP SEQUENCE
            • DROP TABLE
            • DROP TRIGGER
            • DROP TYPE
            • DROP USER
            • END
            • EXECUTE
            • EXPLAIN
            • GRANT
            • INSERT
            • LOCK
            • PREPARE
            • REASSIGN OWNED
            • REFRESH MATERIALIZED VIEW
            • RELEASE SAVEPOINT
            • RESET
            • REVOKE
            • ROLLBACK
            • ROLLBACK TO SAVEPOINT
            • SAVEPOINT
            • SELECT
            • SET
            • SET CONSTRAINTS
            • SET ROLE
            • SET SESSION AUTHORIZATION
            • SET TRANSACTION
            • SHOW
            • SHOW TRANSACTION
            • TRUNCATE
            • UPDATE
            • VALUES
          • WITH clause
            • WITH clause—SQL syntax and semantics
            • recursive CTE
            • case study—traversing an employee hierarchy
            • traversing general graphs
              • graph representation
              • common code
              • undirected cyclic graph
              • directed cyclic graph
              • directed acyclic graph
              • rooted tree
              • Unique containing paths
              • Stress testing find_paths()
            • case study—Bacon Numbers from IMDb
              • Bacon numbers for synthetic data
              • Bacon numbers for IMDb data
        • Data types
          • Array
            • array[] constructor
            • Literals
              • Text typecasting and literals
              • Array of primitive values
              • Row
              • Array of rows
            • FOREACH loop (PL/pgSQL)
            • array of DOMAINs
            • Functions and operators
              • ANY and ALL
              • Array comparison
              • Array slice operator
              • Array concatenation
              • Array properties
              • array_agg(), unnest(), generate_subscripts()
              • array_fill()
              • array_position(), array_positions()
              • array_remove()
              • array_replace() / set value
              • array_to_string()
              • string_to_array()
          • Binary
          • Boolean
          • Character
          • Date and time
            • Conceptual background
            • Timezones and UTC offsets
              • Catalog views
              • Extended_timezone_names
                • Unrestricted full projection
                • Real timezones with DST
                • Real timezones no DST
                • Synthetic timezones no DST
              • Offset/timezone-sensitive operations
                • Timestamptz to/from timestamp conversion
                • Pure 'day' interval arithmetic
              • Four ways to specify offset
                • Name-resolution rules
                  • 1 case-insensitive resolution
                  • 2 ~names.abbrev never searched
                  • 3 'set timezone' string not resolved in ~abbrevs.abbrev
                  • 4 ~abbrevs.abbrev before ~names.name
                  • Helper functions
              • Syntax contexts for offset
              • Recommended practice
            • Typecasting between date-time and text-values
            • Semantics of the date-time data types
              • Date data type
              • Time data type
              • Plain timestamp and timestamptz
              • Interval data type
                • Interval representation
                  • Ad hoc examples
                  • Representation model
                • Interval value limits
                • Declaring intervals
                • Justify() and extract(epoch...)
                • Interval arithmetic
                  • Interval-interval comparison
                  • Interval-interval addition and subtraction
                  • Interval-number multiplication
                  • Moment-moment overloads of "-"
                  • Moment-interval overloads of "+" and "-"
                • Custom interval domains
                • Interval utility functions
            • Typecasting between date-time datatypes
            • Operators
              • Test comparison overloads
              • Test addition overloads
              • Test subtraction overloads
              • Test multiplication overloads
              • Test division overloads
            • General-purpose functions
              • Creating date-time values
              • Manipulating date-time values
              • Current date-time moment
              • Delaying execution
              • Miscellaneous
                • Function age()
                • Function extract() | date_part()
                • Implementations that model the overlaps operator
            • Formatting functions
            • Case study—SQL stopwatch
            • Download & install the date-time utilities
            • ToC
          • JSON
            • JSON literals
            • Primitive and compound data types
            • Code example conventions
            • Indexes and check constraints
            • Functions & operators
              • ::jsonb, ::json, ::text (typecast)
              • ->, ->>, #>, #>> (JSON subvalues)
              • - and #- (remove)
              • || (concatenation)
              • = (equality)
              • @> and <@ (containment)
              • ? and ?| and ?& (key or value existence)
              • array_to_json()
              • jsonb_agg()
              • jsonb_array_elements()
              • jsonb_array_elements_text()
              • jsonb_array_length()
              • jsonb_build_object()
              • jsonb_build_array()
              • jsonb_each()
              • jsonb_each_text()
              • jsonb_extract_path()
              • jsonb_extract_path_text() and json_extract_path_text()
              • jsonb_object()
              • jsonb_object_agg()
              • jsonb_object_keys()
              • jsonb_populate_record()
              • jsonb_populate_recordset()
              • jsonb_pretty()
              • jsonb_set() and jsonb_insert()
              • jsonb_strip_nulls()
              • jsonb_to_record()
              • jsonb_to_recordset()
              • jsonb_typeof()
              • row_to_json()
              • to_jsonb()
          • Money
          • Numeric
          • Range
          • Serial
          • UUID
        • Functions and operators
          • Aggregate functions
            • Informal functionality overview
            • Invocation syntax and semantics
            • grouping sets, rollup, cube
            • Per function signature and purpose
              • avg(), count(), max(), min(), sum()
              • array_agg(), string_agg(), jsonb_agg(), jsonb_object_agg()
              • bit_and(), bit_or(), bool_and(), bool_or()
              • variance(), var_pop(), var_samp(), stddev(), stddev_pop(), stddev_samp()
              • linear regression
                • covar_pop(), covar_samp(), corr()
                • regr_%()
              • mode(), percentile_disc(), percentile_cont()
              • rank(), dense_rank(), percent_rank(), cume_dist()
            • case study—percentile_cont() and the "68–95–99.7" rule
            • case study—linear regression on COVID data
              • Download the COVIDcast data
              • Ingest the COVIDcast data
                • Inspect the COVIDcast data
                • Copy the .csv files to staging tables
                • Check staged data conforms to the rules
                • Join the staged data into a single table
                • SQL scripts
                  • Create cr_staging_tables()
                  • Create cr_copy_from_scripts()
                  • Create assert_assumptions_ok()
                  • Create xform_to_covidcast_fb_survey_results()
                  • ingest-the-data.sql
              • Analyze the COVIDcast data
                • symptoms vs mask-wearing by day
                • Data for scatter-plot for 21-Oct-2020
                • Scatter-plot for 21-Oct-2020
                • SQL scripts
                  • analysis-queries.sql
                  • synthetic-data.sql
          • currval()
          • lastval()
          • nextval()
          • Window functions
            • Informal functionality overview
            • Invocation syntax and semantics
            • Per function signature and purpose
              • row_number(), rank() and dense_rank()
              • percent_rank(), cume_dist() and ntile()
              • first_value(), nth_value(), last_value()
              • lag(), lead()
              • Tables for the code examples
                • table t1
                • table t2
                • table t3
                • table t4
            • case study—analyzing a normal distribution
              • Bucket allocation scheme
              • do_clean_start.sql
              • cr_show_t4.sql
              • cr_dp_views.sql
              • cr_int_views.sql
              • cr_pr_cd_equality_report.sql
              • cr_bucket_using_width_bucket.sql
              • cr_bucket_dedicated_code.sql
              • do_assert_bucket_ok
              • cr_histogram.sql
              • cr_do_ntile.sql
              • cr_do_percent_rank.sql
              • cr_do_cume_dist.sql
              • do_populate_results.sql
              • do_report_results.sql
              • do_compare_dp_results.sql
              • do_demo.sql
              • Reports
                • Histogram report
                • dp-results
                • compare-dp-results
                • int-results
          • yb_hash_code()
        • Extensions
        • Keywords
        • Reserved names
      • YCQL
        • ALTER KEYSPACE
        • ALTER ROLE
        • ALTER TABLE
        • CREATE INDEX
        • CREATE KEYSPACE
        • CREATE ROLE
        • CREATE TABLE
        • CREATE TYPE
        • DROP INDEX
        • DROP KEYSPACE
        • DROP ROLE
        • DROP TABLE
        • DROP TYPE
        • GRANT PERMISSION
        • GRANT ROLE
        • REVOKE PERMISSION
        • REVOKE ROLE
        • USE
        • INSERT
        • SELECT
        • EXPLAIN
        • UPDATE
        • DELETE
        • TRANSACTION
        • TRUNCATE
        • Simple expressions
        • Subscripted expressions
        • Function call
        • Operators
        • BLOB
        • BOOLEAN
        • Collection
        • FROZEN
        • INET
        • Integer and counter
        • Non-integer
        • TEXT
        • DATE, TIME, and TIMESTAMP
        • UUID and TIMEUUID
        • JSONB
        • Date and time
        • BATCH
    • CLIs
      • yb-ctl
      • yb-docker-ctl
      • ysqlsh
      • ycqlsh
      • yb-admin
      • yb-ts-cli
      • ysql_dump
      • ysql_dumpall
    • Configuration
      • yb-tserver
      • yb-master
      • yugabyted
      • Default ports
    • Drivers
      • Client drivers for YSQL
      • Client drivers for YCQL
    • Connectors
      • Kafka Connect YugabyteDB
    • Third party tools
      • Arctype
      • DBeaver
      • DbSchema
      • pgAdmin
      • SQL Workbench/J
      • TablePlus
      • Visual Studio Code
    • Sample datasets
      • Chinook
      • Northwind
      • PgExercises
      • SportsDB
      • Retail Analytics
  • RELEASES
    • Releases overview
      • v2.13 series (latest)
      • v2.12 series (stable)
      • v2.11 series
      • v2.9 series
      • v2.8 series
      • v2.7 series
      • v2.6 series
      • v2.5 series
      • v2.4 series
      • v2.3 series
      • v2.2 series
      • v2.1 series
      • v2.0 series
      • v1.3 series
      • v1.2 series
    • Release versioning
  • FAQ
    • Comparisons
      • Amazon Aurora
      • Google Cloud Spanner
      • CockroachDB
      • TiDB
      • Vitess
      • MongoDB
      • FoundationDB
      • Amazon DynamoDB
      • Azure Cosmos DB
      • Apache Cassandra
      • PostgreSQL
      • Redis in-memory store
      • Apache HBase
    • General FAQ
    • Operations FAQ
    • API compatibility FAQ
    • Yugabyte Platform FAQ
  • MISC
    • YEDIS
      • Quick start
      • Develop
        • Build an application
        • C#
        • C++
        • Go
        • Java
        • NodeJS
        • Python
      • API reference
        • APPEND
        • AUTH
        • CONFIG
        • CREATEDB
        • DELETEDB
        • LISTDB
        • SELECT
        • DEL
        • ECHO
        • EXISTS
        • EXPIRE
        • EXPIREAT
        • FLUSHALL
        • FLUSHDB
        • GET
        • GETRANGE
        • GETSET
        • HDEL
        • HEXISTS
        • HGET
        • HGETALL
        • HINCRBY
        • HKEYS
        • HLEN
        • HMGET
        • HMSET
        • HSET
        • HSTRLEN
        • HVALS
        • INCR
        • INCRBY
        • KEYS
        • MONITOR
        • PEXPIRE
        • PEXPIREAT
        • PTTL
        • ROLE
        • SADD
        • SCARD
        • RENAME
        • SET
        • SETEX
        • PSETEX
        • SETRANGE
        • SISMEMBER
        • SMEMBERS
        • SREM
        • STRLEN
        • ZRANGE
        • TSADD
        • TSCARD
        • TSGET
        • TSLASTN
        • TSRANGEBYTIME
        • TSREM
        • TSREVRANGEBYTIME
        • TTL
        • ZADD
        • ZCARD
        • ZRANGEBYSCORE
        • ZREM
        • ZREVRANGE
        • ZSCORE
        • PUBSUB
        • PUBLISH
        • SUBSCRIBE
        • UNSUBSCRIBE
        • PSUBSCRIBE
        • PUNSUBSCRIBE
    • Legal
      • Third party software
> CLIs >

yb-admin

Report a doc issue Suggest new content
  • Syntax
    • Online help
  • Commands
    • Universe and cluster commands
    • Table commands
    • Backup and snapshot commands
    • Multi-zone and multi-region deployment commands
    • Master-follower deployment commands
    • Read replica deployment commands
    • Security commands
    • Change data capture (CDC) commands
    • Decommissioning commands
    • Rebalancing commands
    • Upgrade YSQL system catalog

The yb-admin utility, located in the bin directory of YugabyteDB home, provides a command line interface for administering clusters.

It invokes the yb-master and yb-tserver servers to perform the necessary administration.

Syntax

To use the yb-admin utility from the YugabyteDB home directory, run ./bin/yb-admin using the following syntax.

yb-admin \
    [ -master_addresses <master-addresses> ]  \
    [ -timeout_ms <millisec> ] \
    [ -certs_dir_name <dir_name> ] \
    <command> [ command_flags ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

  • timeout_ms: The RPC timeout, in milliseconds. Default value is 60000. A value of 0 means don't wait; -1 means wait indefinitely.

  • certs_dir_name: The directory with certificates to use for secure server connections. Default value is "".

    To connect to a cluster with TLS enabled, you must include the -certs_dir_name flag with the directory location where the root certificate is located.

  • command: The operation to be performed. See command for syntax details and examples.

  • command_flags: Configuration flags that can be applied to the command.

Online help

To display the online help, run yb-admin --help from the YugabyteDB home directory.

$ ./bin/yb-admin --help

Commands

  • Universe and cluster
  • Table
  • Backup and snapshot
  • Deployment topology
    • Multi-zone and multi-region
    • Master-follower
    • Read replica
  • Security
    • Encryption at rest
  • Change data capture (CDC)
  • Decommissioning
  • Rebalancing
  • Upgrade YSQL system catalog

Universe and cluster commands

get_universe_config

Gets the configuration for the universe.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    get_universe_config
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

change_config

Changes the configuration of a tablet.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    change_config <tablet_id> \
    [ ADD_SERVER | REMOVE_SERVER ] \
    <peer_uuid> \
    [ PRE_VOTER | PRE_OBSERVER ]
  • master_addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • tablet_id: The identifier (ID) of the tablet.
  • ADD_SERVER | REMOVE_SERVER: Subcommand to add or remove the server.
  • peer_uuid: The UUID of the tablet server hosting the peer tablet.
  • PRE_VOTER | PRE_OBSERVER: Role of the new peer joining the quorum. Required when using the ADD_SERVER subcommand.

Notes:

If you need to take a node down temporarily, but intend to bring it back up, you should not need to use the REMOVE_SERVER subcommand.

  • If the node is down for less than 15 minutes, it will catch up through RPC calls when it comes back online.
  • If the node is offline longer than 15 minutes, then it will go through Remote Bootstrap, where the current leader will forward all relevant files to catch up.

If you do not intend to bring a node back up (perhaps you brought it down for maintenance, but discovered that the disk is bad), then you want to decommission the node (using the REMOVE_SERVER subcommand) and then add in a new node (using the ADD_SERVER subcommand).

change_master_config

Changes the master configuration.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    change_master_config \
    [ ADD_SERVER|REMOVE_SERVER ] \
    <ip_addr> <port> \
    [<uuid>]
  • master_addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • ADD_SERVER | REMOVE_SERVER: Adds or removes a new YB-Master server.
    • After adding or removing a node, verify the status of the YB-Master server on the YB-Master UI page (http://node-ip:7000) or run the yb-admin dump_masters_state command.
  • ip_addr: The IP address of the server node.
  • port: The port of the server node.
  • uuid: The UUID for the server that is being added/removed.

list_tablet_servers

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_tablet_servers <tablet_id>
  • master_addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • tablet_id: The identifier (ID) of the tablet.

list_tablets

Lists all tablets and their replica locations for a particular table.

Useful to find out who the LEADER of a tablet is.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_tablets <keyspace> <table_name> [max_tablets]
  • master_addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • keyspace: The namespace, or name of the database or keyspace.
  • table_name: The name of the table.
  • max_tablets: The maximum number of tables to be returned. Default is 10. Set to 0 to return all tablets.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    list_tablets ydb test_tb 0
Tablet UUID                       Range                                                     Leader
cea3aaac2f10460a880b0b4a2a4b652a  partition_key_start: "" partition_key_end: "\177\377"     127.0.0.1:9100
e509cf8eedba410ba3b60c7e9138d479  partition_key_start: "\177\377" partition_key_end: ""

list_all_tablet_servers

Lists all tablet servers.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_all_tablet_servers
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

list_all_masters

Displays a list of all YB-Master servers in a table listing the master UUID, RPC host and port, state (ALIVE or DEAD), and role (LEADER, FOLLOWER, or UNKNOWN_ROLE).

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_all_masters
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

Example

$ ./bin/yb-admin \
    -master_addresses node7:7100,node8:7100,node9:7100 \
    list_all_masters
Master UUID         RPC Host/Port          State      Role
...                   node8:7100           ALIVE     FOLLOWER
...                   node9:7100           ALIVE     FOLLOWER
...                   node7:7100           ALIVE     LEADER

list_replica_type_counts

Prints a list of replica types and counts for the specified table.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_replica_type_counts <keyspace> <table_name>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • keyspace: The name of the database or keyspace.
  • table_name: The name of the table.

dump_masters_state

Prints the status of the YB-Master servers.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    dump_masters_state
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

list_tablet_server_log_locations

List the locations of the tablet server logs.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_tablet_server_log_locations
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

list_tablets_for_tablet_server

Lists all tablets for the specified tablet server (YB-TServer).

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_tablets_for_tablet_server <ts_uuid>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • ts_uuid: The UUID of the tablet server (YB-TServer).

split_tablet

Splits the specified hash-sharded tablet and computes the split point as the middle of tablet's sharding range.

Note

The yb-admin split_tablet command is not yet supported for use with range-sharded tablets. To follow plans on this, see GitHub #5166
split_tablet -master_addresses <master-addresses> <tablet_id_to_split>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • tablet_id_to_split: The identifier of the tablet to split.

For more information on tablet splitting, see:

  • Tablet splitting — Architecture overview
  • Automatic Re-sharding of Data with Tablet Splitting — Architecture design document in the GitHub repository.

master_leader_stepdown

Forces the master leader to step down. The specified YB-Master node will take its place as leader.

Note

  • Use this command only if recommended by Yugabyte support.

  • There is a possibility of downtime.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    master_leader_stepdown [ <new_leader_id> ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • new_leader_id: (Optional) The identifier (ID) of the new YB-Master leader. If not specified, the new leader is automatically elected.

ysql_catalog_version

Prints the current YSQL schema catalog version.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    ysql_catalog_version
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

Example

yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    ysql_catalog_version

The version output displays:

Version:1

Table commands

list_tables

Prints a list of all tables. Optionally, include the database type, table ID, and the table type.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_tables \
    [ include_db_type ] [ include_table_id ] [ include_table_type ]
yb-admin \
    -master_addresses <master-addresses> list_tables
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • include_db_type: (Optional) Add this flag to include the database type for each table.
  • include_table_id: (Optional) Add this flag to include the table ID for each table.
  • include_table_type: (Optional) Add this flag to include the table type for each table.

Returns tables in the following format, depending on the flags used:

<db_type>.<namespace>.<table_name> table_id table_type
  • db_type: The type of database. Valid values include ysql, ycql, yedis, and unknown.
  • namespace: The name of the database (for YSQL) or keyspace (for YCQL).
  • table_name: The name of the table.
  • table_type: The type of table. Valid values include catalog, table, index, and other.

Tip

To display a list of tables and their UUID (table_id) values, open the YB-Master UI (<master_host>:7000/) and click Tables in the navigation bar.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    list_tables
...
yugabyte.pg_range
template1.pg_attrdef
template0.pg_attrdef_adrelid_adnum_index
template1.pg_conversion
system_platform.pg_opfamily
postgres.pg_opfamily_am_name_nsp_index
system_schema.functions
template0.pg_statistic
system.local
template1.pg_inherits_parent_index
template1.pg_amproc
system_platform.pg_rewrite
yugabyte.pg_ts_config_cfgname_index
template1.pg_trigger_tgconstraint_index
template1.pg_class
template1.pg_largeobject
system_platform.sql_parts
template1.pg_inherits
...

compact_table

Triggers manual compaction on a table.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    compact_table <keyspace> <table_name> \
    [timeout_in_seconds]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • keyspace: Specifies the database ysql.db-name or keyspace ycql.keyspace-name.
  • table_name: Specifies the table name.
  • timeout_in_seconds: Specifies duration, in seconds when the cli timeouts waiting for compaction to end. Default value is 20.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    compact_table ycql.kong test
Started compaction of table kong.test
Compaction request id: 75c406c1d2964487985f9c852a8ef2a3
Waiting for compaction...
Compaction complete: SUCCESS

modify_table_placement_info

Modifies the placement information (cloud, region, and zone) for a table.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    modify_table_placement_info <keyspace> <table_name> <placement_info> <replication_factor> \
    [ <placement_id> ]

or alternatively:

yb-admin \
    -master_addresses <master-addresses> \
    modify_table_placement_info tableid.<table_id> <placement_info> <replication_factor> \
    [ <placement_id> ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • keyspace: The namespace, or name of the database or keyspace.
  • table_name: The name of the table.
  • table_id: The unique uuid associated with the table whose placement policy is being changed.
  • placement_info: Comma-delimited list of placements for cloud.region.zone. Default value is cloud1.datacenter1.rack1.
  • replication_factor: The number of replicas for each tablet.
  • placement_id: Identifier of the primary cluster. Optional. If set, it has to match the placement_id specified for the primary cluster in the cluster configuration.

Example

$ ./bin/yb-admin \
    -master_addresses $MASTER_RPC_ADDRS \
    modify_table_placement_info  testdatabase testtable \
    aws.us-west.us-west-2a,aws.us-west.us-west-2b,aws.us-west.us-west-2c 3

Verify this in the Master UI by opening the YB-Master UI (<master_host>:7000/) and clicking Tables in the navigation bar. Navigate to the appropriate table whose placement information you're changing, and check the Replication Info section.

Notes

Setting placement for tables is not supported for clusters with read-replicas or leader affinity policies enabled.

Use this command to create custom placement policies only for YCQL tables or transaction status tables. For YSQL tables, use Tablespaces instead.

create_transaction_table

Creates a transaction status table to be used within a region. This command should always be followed by modify_table_placement_info to set the placement information for the newly created transaction status table.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    create_transaction_table \
    <table_name>
  • master_addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • table_name: The name of the transaction status table to be created; this must start with transactions_.

The transaction status table will be created as system.<table_name>.

Example

$ ./bin/yb-admin \
    -master_addresses $MASTER_RPC_ADDRS \
    create_transaction_table \
    transactions_us_east

Verify this in the Master UI by opening the YB-Master UI (<master_host>:7000/) and clicking Tables in the navigation bar. You should see a new system table with keyspace system and table name transactions_us_east.

Next, set the placement on the newly created transactions table:

$ ./bin/yb-admin \
    -master_addresses $MASTER_RPC_ADDRS \
    modify_table_placement_info system transactions_us_east \
    aws.us-east.us-east-1a,aws.us-east.us-east-1b,aws.us-east.us-east-1c 3

After the load balancer runs, all tablets of system.transactions_us_east should now be solely located within the AWS us-east region.


Note

The preferred way to create transaction status tables with YSQL is to create a tablespace with the appropriate placement. YugabyteDB automatically creates a transaction table using the tablespace's placement when you create the first table using the new tablespace.

Backup and snapshot commands

The following backup and snapshot commands are available:

  • create_database_snapshot creates a snapshot of the specified YSQL database
  • create_keyspace_snapshot creates a snapshot of the specified YCQL keyspace
  • list_snapshots returns a list of all snapshots, restores, and their states
  • create_snapshot creates a snapshot of one or more YCQL tables and indexes
  • restore_snapshot restores a snapshot
  • export_snapshot creates a snapshot metadata file
  • import_snapshot imports a snapshot metadata file
  • delete_snapshot deletes a snapshot's information
  • create_snapshot_schedule sets the schedule for snapshot creation
  • list_snapshot_schedules returns a list of all snapshot schedules
  • restore_snapshot_schedule restores all objects in a scheduled snapshot

create_database_snapshot

Creates a snapshot of the specified YSQL database.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    create_database_snapshot <database_name>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • database: The name of the YSQL database.

When this command runs, a snapshot_id is generated and printed.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    create_database_snapshot

To see if the database snapshot creation has completed, run the yb-admin list_snapshots command.

create_keyspace_snapshot

Creates a snapshot of the specified YCQL keyspace.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    create_keyspace_snapshot <keyspace_name>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • keyspace: The name of the YCQL keyspace.

When this command runs, a snapshot_id is generated and printed.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    create_keyspace_snapshot

To see if the database snapshot creation has completed, run the yb-admin list_snapshots command.

list_snapshots

Prints a list of all snapshot IDs, restoration IDs, and states. Optionally, prints details (including keyspaces, tables, and indexes) in JSON format.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_snapshots \
    [ show_details ] [ not_show_restored ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • show_details: (Optional) Print snapshot details, including the keyspaces, tables, and indexes.
  • not_show_restored: (Optional) Do not show successful "restorations" (that is, COMPLETE). Useful to see a list of only uncompleted or failed restore operations.
  • show_deleted: (Optional) Show snapshots that are deleted, but still retained in memory.

Possible state values for creating and restoring snapshots:

  • create_snapshot: CREATING, COMPLETE, DELETING, DELETED, or FAILED.
  • restore_snapshot: COMPLETE, DELETING, DELETED, or FAILED.

By default, the list_snapshot command prints the current state of the following operations:

  • create_snapshot: snapshot_id, keyspace, table, state
  • restore_snapshot: snapshot_id, restoration_id, state.
  • delete_snapshot: snapshot_id, state.

When show_details is included, the list_snapshot command prints the following details in JSON format:

  • type: NAMESPACE
    • id: <snapshot_id> or <restoration_id>
    • data:
      • name: "<namespace_name>"
      • database_type: "YQL_DATABASE_CQL"
      • colocated: true or false
      • state: "<state>"
  • type: TABLE <== Use for table or index
    • id: "<table_id>" or "<index_id>"
    • data:
      • name: "<table_name>" or "<index_id>"
      • version: "<table_version>"
      • state: "<state>"
      • state_msg: "<state_msg>"
      • next_column_id: "<column_id>"
      • table_type: "YQL_TABLE_TYPE"
      • namespace_id: "<namespace_id>"
      • indexed_table_id (index only): <table_id>
      • is_local_index (index only): true or false
      • is_unique_index (index only): true or false

Example

In this example, the optional show_details flag is added to generate the snapshot details.

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    list_snapshots show_details

Because show_details was included, list_snapshots prints the details in JSON format, like this:

f566b03b-b85e-41a0-b903-875cd305c1c5  COMPLETE
{"type":"NAMESPACE","id":"8053dd55d478437cba57d9f67caac154","data":{"name":"yugabyte","database_type":"YQL_DATABASE_CQL","colocated":false,"state":"RUNNING"}}
{"type":"TABLE","id":"a7e940e724ef497ebe94bf69bfe507d9","data":{"name":"tracking1","version":1,"state":"RUNNING","state_msg":"Current schema version=1","next_column_id":13,"table_type":"YQL_TABLE_TYPE","namespace_id":"8053dd55d478437cba57d9f67caac154"}}
{"type":"NAMESPACE","id":"8053dd55d478437cba57d9f67caac154","data":{"name":"yugabyte","database_type":"YQL_DATABASE_CQL","colocated":false,"state":"RUNNING"}}
{"type":"TABLE","id":"b48f4d7695f0421e93386f7a97da4bac","data":{"name":"tracking1_v_idx","version":0,"state":"RUNNING","next_column_id":12,"table_type":"YQL_TABLE_TYPE","namespace_id":"8053dd55d478437cba57d9f67caac154","indexed_table_id":"a7e940e724ef497ebe94bf69bfe507d9","is_local_index":false,"is_unique_index":false}}

If show_details is not included, list_snapshots prints the snapshot_id and state:

f566b03b-b85e-41a0-b903-875cd305c1c5  COMPLETE

create_snapshot

Creates a snapshot of the specified YCQL tables and their indexes. Prior to v.2.1.8, indexes were not automatically included. You can specify multiple tables, even from different keyspaces.

Snapshots don't auto-expire

Snapshots you create via create_snapshot persist on disk until you remove them using the delete_snapshot command.

Use the create_snapshot_schedule command to create snapshots that expire after a specified time interval.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    create_snapshot <keyspace> <table_name> | <table_id> \
    [<keyspace> <table_name> | <table_id> ]... \
    [flush_timeout_in_seconds]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • keyspace: The name of the database or keyspace formatted as <ycql|ysql|yedis>..
  • table_name: The name of the table name.
  • table_id: The identifier (ID) of the table.
  • flush_timeout_in_seconds: Specifies duration, in seconds, before flushing snapshot. Default value is 60. To skip flushing, set the value to 0.

When this command runs, a snapshot_id is generated and printed.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    create_snapshot ydb test_tb
Started flushing table ydb.test_tb
Flush request id: fe0db953a7a5416c90f01b1e11a36d24
Waiting for flushing...
Flushing complete: SUCCESS
Started snapshot creation: 4963ed18fc1e4f1ba38c8fcf4058b295

To see if the snapshot creation has finished, run the yb-admin list_snapshots command.

restore_snapshot

Restores the specified snapshot, including the tables and indexes. When the operation starts, a restoration_id is generated.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    restore_snapshot <snapshot_id> <restore-target>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • snapshot_id: The identifier (ID) for the snapshot.
  • restore-target: The time to which to restore the snapshot. This can be either an absolute Unix time, or a relative time such as minus 5m (to restore to 5 minutes ago). Optional; omit to restore to the given snapshot's creation time.

Example

$ ./bin/yb-admin restore_snapshot 72ad2eb1-65a2-4e88-a448-7ef4418bc469

When the restore starts, the snapshot_id and the generated restoration_id are displayed.

Started restoring snapshot: 72ad2eb1-65a2-4e88-a448-7ef4418bc469
Restoration id: 5a9bc559-2155-4c38-ac8b-b6d0f7aa1af6

To see if the snapshot was successfully restored, you can run the yb-admin list_snapshots command.

$ ./bin/yb-admin list_snapshots

For the example above, the restore failed, so the following displays:

Restoration UUID                      State
5a9bc559-2155-4c38-ac8b-b6d0f7aa1af6  FAILED

export_snapshot

Generates a metadata file for the specified snapshot, listing all the relevant internal UUIDs for various objects (table, tablet, etc.).

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    export_snapshot <snapshot_id> <file_name>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • snapshot_id: The identifier (ID) for the snapshot.
  • file_name: The name of the file to contain the metadata. Recommended file extension is .snapshot.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    export_snapshot 4963ed18fc1e4f1ba38c8fcf4058b295 \
    test_tb.snapshot
Exporting snapshot 4963ed18fc1e4f1ba38c8fcf4058b295 (COMPLETE) to file test_tb.snapshot
Snapshot meta data was saved into file: test_tb.snapshot

import_snapshot

Imports the specified snapshot metadata file.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    import_snapshot <file_name> \
    [<keyspace> <table_name> [<keyspace> <table_name>]...]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • file_name: The name of the snapshot file to import
  • keyspace: The name of the database or keyspace
  • table_name: The name of the table

Note

The keyspace and the table can be different from the exported one.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    import_snapshot test_tb.snapshot ydb test_tb
Read snapshot meta file test_tb.snapshot
Importing snapshot 4963ed18fc1e4f1ba38c8fcf4058b295 (COMPLETE)
Target imported table name: ydb.test_tb
Table being imported: ydb.test_tb
Successfully applied snapshot.
Object            Old ID                            New ID
Keyspace          c478ed4f570841489dd973aacf0b3799  c478ed4f570841489dd973aacf0b3799
Table             ff4389ee7a9d47ff897d3cec2f18f720  ff4389ee7a9d47ff897d3cec2f18f720
Tablet 0          cea3aaac2f10460a880b0b4a2a4b652a  cea3aaac2f10460a880b0b4a2a4b652a
Tablet 1          e509cf8eedba410ba3b60c7e9138d479  e509cf8eedba410ba3b60c7e9138d479
Snapshot          4963ed18fc1e4f1ba38c8fcf4058b295  4963ed18fc1e4f1ba38c8fcf4058b295

delete_snapshot

Deletes the specified snapshot.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    delete_snapshot <snapshot_id>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • snapshot_id: The identifier (ID) of the snapshot.

create_snapshot_schedule

Creates a snapshot schedule. A schedule consists of a list of objects to be included in a snapshot, a time interval at which to back them up, and a retention time.

Returns a schedule ID in JSON format.

Syntax

yb-admin create_snapshot_schedule \
    <snapshot-interval>\
    <retention-time>\
    <filter-expression>
  • snapshot-interval: The frequency at which to take snapshots, in minutes.
  • retention-time: The number of minutes to keep a snapshot before deleting it.
  • filter-expression: The set of objects to include in the snapshot.

The filter expression is a list of acceptable objects, which can be either raw tables, or keyspaces (YCQL) or databases (YSQL). For proper consistency guarantees, Yugabyte recommends setting this up on a per-keyspace (YCQL) or per-database (YSQL) level.

Example

Take a snapshot of the ysql.yugabyte database once per minute, and retain each snapshot for 10 minutes:

yb-admin create_snapshot_schedule 1 10 ysql.yugabyte
{
  "schedule_id": "6eaaa4fb-397f-41e2-a8fe-a93e0c9f5256"
}

list_snapshot_schedules

Lists the snapshots associated with a given schedule. Or, lists all schedules and their associated snapshots.

Returns one or more schedule lists in JSON format.

Schedule list entries contain:

  • schedule ID
  • schedule options (interval and retention time)
  • a list of snapshots that the system has automatically taken

Snapshot list entries include:

  • the snapshot's unique ID
  • the snapshot's creation time
  • the previous snapshot’s creation time, if available. Use this time to make sure that, on restore, you pick the correct snapshot, which is guaranteed to have the data you want to bring back.

Syntax

yb-admin list_snapshot_schedules <snapshot-id>

Where snapshot-id is the snapshot's unique identifier. The ID is optional; omit the ID to return all schedules in the system.

Example

$ ./bin/yb-admin \
    list_snapshot_schedules 6eaaa4fb-397f-41e2-a8fe-a93e0c9f5256
{
  "schedules": [
    {
      "id": "6eaaa4fb-397f-41e2-a8fe-a93e0c9f5256",
      "options": {
        "interval": "60.000s",
        "retention": "600.000s"
      },
      "snapshots": [
        {
          "id": "386740da-dc17-4e4a-9a2b-976968b1deb5",
          "snapshot_time_utc": "2021-04-28T13:35:32.499002+0000"
        },
        {
          "id": "aaf562ca-036f-4f96-b193-f0baead372e5",
          "snapshot_time_utc": "2021-04-28T13:36:37.501633+0000",
          "previous_snapshot_time_utc": "2021-04-28T13:35:32.499002+0000"
        }
      ]
    }
  ]
}

restore_snapshot_schedule

Schedules group a set of items into a single tracking object (the schedule). When you restore, you can choose a particular schedule and a point in time, and revert the state of all affected objects back to the chosen time.

Syntax

yb-admin restore_snapshot_schedule <schedule-id> <restore-target>
  • schedule-id: The identifier (ID) of the schedule to be restored.
  • restore-target: The time to which to restore the snapshots in the schedule. This can be either an absolute Unix timestamp, or a relative time such as minus 5m (to restore to 5 minutes ago).

You can also use a YSQL timestamp or YCQL timestamp with the restore command, if you like.

In addition to restoring to a particular timestamp, you can also restore from a relative time, such as "ten minutes ago".

When you specify a relative time, you can specify any or all of days, hours, minutes, and seconds. For example:

  • minus 5m to restore from five minutes ago
  • minus 1h to restore from one hour ago
  • minus 3d to restore from three days ago
  • minus 1h 5m to restore from one hour and five minutes ago

Relative times can be in any of the following formats (again, note that you can specify any or all of days, hours, minutes, and seconds):

  • ISO 8601: 3d 4h 5m 6s
  • Abbreviated PostgreSQL: 3 d 4 hrs 5 mins 6 secs
  • Traditional PostgreSQL: 3 days 4 hours 5 minutes 6 seconds
  • SQL standard: D H:M:S

Examples

Restore from an absolute timestamp:

$ ./bin/yb-admin \
    restore_snapshot_schedule 6eaaa4fb-397f-41e2-a8fe-a93e0c9f5256 \
    1617670679185100

Restore from a relative time:

$ ./bin/yb-admin \
    restore_snapshot_schedule 6eaaa4fb-397f-41e2-a8fe-a93e0c9f5256 \
    minus 60s

In both cases, the output is similar to the following:

{
    "snapshot_id": "f71c265d-4b33-4c71-9fc5-c0acab943ee7",
    "restoration_id": "b1b96d53-f9f9-46c5-b81c-6937301c8eff"
}

Multi-zone and multi-region deployment commands

modify_placement_info

Modifies the placement information (cloud, region, and zone) for a deployment.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    modify_placement_info <placement_info> <replication_factor> \
    [ <placement_id> ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • placement_info: Comma-delimited list of placements for cloud.region.zone. Optionally, after each placement block, we can also specify a minimum replica count separated by a colon. This count indicates how many minimum replicas of each tablet we want in that placement block. Its default value is 1. It is not recommended to repeat the same placement multiple times but instead specify the total count after the colon. However, in the event that the user specifies a placement multiple times, the total count from all mentions is taken.
  • replication_factor: The number of replicas for each tablet. This value should be greater than or equal to the total of replica counts specified in placement_info.
  • placement_id: The identifier of the primary cluster, which can be any unique string. Optional. If not set, a randomly-generated ID will be used.

Example

$ ./bin/yb-admin \
    -master_addresses $MASTER_RPC_ADDRS \
    modify_placement_info  \
    aws.us-west.us-west-2a:2,aws.us-west.us-west-2b:2,aws.us-west.us-west-2c 5

This will place a minimum of:

  1. 2 replicas in aws.us-west.us-west-2a
  2. 2 replicas in aws.us-west.us-west-2b
  3. 1 replica in aws.us-west.us-west-2c

You can verify the new placement information by running the following curl command:

$ curl -s http://<any-master-ip>:7000/cluster-config

set_preferred_zones

Sets the preferred availability zones (AZs) and regions.

Note

  • Make sure you've already run modify_placement_info command beforehand.

  • When nodes in the "preferred" availability zones and regions are alive and healthy, the tablet leaders are placed on nodes in those zones and regions. By default, all nodes are eligible to have tablet leaders. Having all tablet leaders reside in a single region will reduce the number of network hops for the database to write transactions and thus increase performance and lowering latency.

  • By default, the transaction tablet leaders will not respect these preferred zones and will be balanced across all nodes. In the transaction path, there is a roundtrip from the user to the transaction status tablet serving the transaction - if the leader closest to the user is used rather than forcing a roundtrip to the preferred zone, then there will be efficiency improvements.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    set_preferred_zones <cloud.region.zone> \
    [<cloud.region.zone>]...
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • cloud.region.zone: Specifies the cloud, region, and zone. Default value is cloud1.datacenter1.rack1.

Suppose you have a deployment in the following regions: gcp.us-east4.us-east4-b, gcp.asia-northeast1.asia-northeast1-c, and gcp.us-west1.us-west1-c. Looking at the cluster config:

$ curl -s http://<any-master-ip>:7000/cluster-config

Here is a sample configuration:

replication_info {
  live_replicas {
    num_replicas: 3
    placement_blocks {
      cloud_info {
        placement_cloud: "gcp"
        placement_region: "us-west1"
        placement_zone: "us-west1-c"
      }
      min_num_replicas: 1
    }
    placement_blocks {
      cloud_info {
        placement_cloud: "gcp"
        placement_region: "us-east4"
        placement_zone: "us-east4-b"
      }
      min_num_replicas: 1
    }
    placement_blocks {
      cloud_info {
        placement_cloud: "gcp"
        placement_region: "us-asia-northeast1"
        placement_zone: "us-asia-northeast1-c"
      }
      min_num_replicas: 1
    }
  }
}

The following command sets the preferred zone to gcp.us-west1.us-west1-c:

ssh -i $PEM $ADMIN_USER@$MASTER1 \
   ~/master/bin/yb-admin --master_addresses $MASTER_RPC_ADDRS \
    set_preferred_zones \
    gcp.us-west1.us-west1-c

Verify by running the following.

$ curl -s http://<any-master-ip>:7000/cluster-config

Looking again at the cluster config you should see affinitized_leaders added:

replication_info {
  live_replicas {
    num_replicas: 3
    placement_blocks {
      cloud_info {
        placement_cloud: "gcp"
        placement_region: "us-west1"
        placement_zone: "us-west1-c"
      }
      min_num_replicas: 1
    }
    placement_blocks {
      cloud_info {
        placement_cloud: "gcp"
        placement_region: "us-east4"
        placement_zone: "us-east4-b"
      }
      min_num_replicas: 1
    }
    placement_blocks {
      cloud_info {
        placement_cloud: "gcp"
        placement_region: "us-asia-northeast1"
        placement_zone: "us-asia-northeast1-c"
      }
      min_num_replicas: 1
    }
  }
  affinitized_leaders {
    placement_cloud: "gcp"
    placement_region: "us-west1"
    placement_zone: "us-west1-c"
  }
}

Master-follower deployment commands

setup_universe_replication

Sets up the universe replication for the specified source universe. Use this command only if no tables have been configured for replication. If tables are already configured for replication, use alter_universe_replication to add more tables.

To verify if any tables are already configured for replication, use list_cdc_streams.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    setup_universe_replication \
    <source_universe_uuid> \
    <source_master_addresses> \
    <comma_separated_list_of_table_ids> \
    [comma_separated_list_of_producer_bootstrap_ids]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • source_universe_uuid: The UUID of the source universe.
  • source_master_addresses: Comma-separated list of the source master addresses.
  • comma_separated_list_of_table_ids: Comma-separated list of table identifiers (table_id).
  • comma_separated_list_of_producer_bootstrap_ids: Comma-separated list of bootstrap identifiers (bootstrap_id). These are obtained from using bootstrap_cdc_producer.

Note

It is important that the bootstrap_ids are in the same order as their corresponding table_ids!

Tip

To display a list of tables and their UUID (table_id) values, open the YB-Master UI (<master_host>:7000/) and click Tables in the navigation bar.

Example

./bin/yb-admin \
    -master_addresses 127.0.0.11:7100,127.0.0.12:7100,127.0.0.13:7100 \
    setup_universe_replication e260b8b6-e89f-4505-bb8e-b31f74aa29f3 \
    127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100 \
    000030a5000030008000000000004000,000030a5000030008000000000004005,dfef757c415c4b2cacc9315b8acb539a

alter_universe_replication

Changes the universe replication for the specified source universe. Use this command to:

  • Add or remove tables in an existing replication UUID
  • Modify the source master addresses

If no tables have been configured for replication, use setup_universe_replication.

To check if any tables are configured for replication, use list_cdc_streams.

Syntax

Use the set_master_addresses subcommand to replace the source master address list. Use this if the set of masters on the source changes:

yb-admin -master_addresses <master-addresses> \
    alter_universe_replication <source_universe_uuid> \
    set_master_addresses <source_master_addresses>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • source_universe_uuid: The UUID of the source universe.
  • source_master_addresses: Comma-separated list of the source master addresses.

Use the add_table subcommand to add one or more tables to the existing list:

yb-admin -master_addresses <master-addresses> \
    alter_universe_replication <source_universe_uuid> \
    add_table [comma_separated_list_of_table_ids] \
    [comma_separated_list_of_producer_bootstrap_ids]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • source_universe_uuid: The UUID of the source universe.
  • comma_separated_list_of_table_ids: Comma-separated list of table identifiers (table_id).
  • comma_separated_list_of_producer_bootstrap_ids: Comma-separated list of bootstrap identifiers (bootstrap_id). These are obtained from using bootstrap_cdc_producer.

Note

It is important that the bootstrap_ids are in the same order as their corresponding table_ids!

Use the remove_table subcommand to remove one or more tables from the existing list:

yb-admin -master_addresses <master-addresses> \
    alter_universe_replication <source_universe_uuid> \
    remove_table [comma_separated_list_of_table_ids]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • source_universe_uuid: The UUID of the source universe.
  • comma_separated_list_of_table_ids: Comma-separated list of table identifiers (table_id).

delete_universe_replication <source_universe_uuid>

Deletes universe replication for the specified source universe.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    delete_universe_replication <source_universe_uuid>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • source_universe_uuid: The UUID of the source universe.

set_universe_replication_enabled

Sets the universe replication to be enabled or disabled.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    set_universe_replication_enabled <source_universe_uuid>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • source_universe_uuid: The UUID of the source universe.
  • 0 | 1: Disabled (0) or enabled (1). Default is 1.

Read replica deployment commands

add_read_replica_placement_info

Add a read replica cluster to the master configuration.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    add_read_replica_placement_info <placement_info> \
    <replication_factor> \
    [ <placement_id> ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • placement_info: A comma-delimited list of placements for cloud.region.zone. Default value is cloud1.datacenter1.rack1.
  • replication_factor: The number of replicas.
  • placement_id: The identifier of the read replica cluster, which can be any unique string. If not set, a randomly-generated ID will be used. Primary and read replica clusters must use different placement IDs.

modify_read_replica_placement_info

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    modify_read_replica_placement_info <placement_info> \
    <replication_factor> \
    [ <placement_id> ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • placement_info: A comma-delimited list of placements for cloud.region.zone. Default value is cloud1.datacenter1.rack1.
  • replication_factor: The number of replicas.
  • placement_id: The identifier of the read replica cluster, which can be any unique string. If not set, a randomly-generated ID will be used. Primary and read replica clusters must use different placement IDs.

delete_read_replica_placement_info

Delete the read replica.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    delete_read_replica_placement_info [ <placement_id> ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • placement_id: The identifier of the read replica cluster, which can be any unique string. If not set, a randomly-generated ID will be used. Primary and read replica clusters must use different placement IDs.

Security commands

Encryption at rest commands

For details on using encryption at rest, see Encryption at rest.

add_universe_keys_to_all_masters

Sets the contents of key_path in-memory on each YB-Master node.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    add_universe_keys_to_all_masters <key_id> <key_path>
  • key_id: Universe-unique identifier (can be any string, such as a string of a UUID) that will be associated to the universe key contained in the contents of key_path as a byte[].
  • key_path: The path to the file containing the universe key.

Note

After adding the universe keys to all YB-Master nodes, you can verify the keys exist using the yb-admin all_masters_have_universe_key_in_memory command and enable encryption using the rotate_universe_key_in_memory command.

all_masters_have_universe_key_in_memory

Checks whether the universe key associated with the provided key_id exists in-memory on each YB-Master node.

yb-admin \
    -master_addresses <master-addresses> all_masters_have_universe_key_in_memory <key_id>
  • key_id: Universe-unique identifier (can be any string, such as a string of a UUID) that will be associated to the universe key contained in the contents of key_path as a byte[].

rotate_universe_key_in_memory

Rotates the in-memory universe key to start encrypting newly-written data files with the universe key associated with the provided key_id.

Note

The all_masters_have_universe_key_in_memory value must be true for the universe key to be successfully rotated and enabled).
yb-admin \
    -master_addresses <master-addresses> rotate_universe_key_in_memory <key_id>
  • key_id: Universe-unique identifier (can be any string, such as a string of a UUID) that will be associated to the universe key contained in the contents of key_path as a byte[].

disable_encryption_in_memory

Disables the in-memory encryption at rest for newly-written data files.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    disable_encryption_in_memory

is_encryption_enabled

Checks if cluster-wide encryption is enabled.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    is_encryption_enabled
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

Returns message:

Encryption status: ENABLED with key id <key_id_2>

The new key ID (<key_id_2>) should be different from the previous one (<key_id>).

Example

./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    is_encryption_enabled
Encryption status: ENABLED with key id <key_id_2>

Change data capture (CDC) commands

create_cdc_stream

Creates a change data capture (CDC) stream for the specified table.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    create_cdc_stream <table_id>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • table_id: The identifier (ID) of the table.

Tip

To display a list of tables and their UUID (table_id) values, open the YB-Master UI (<master_host>:7000/) and click Tables in the navigation bar.

list_cdc_streams

Lists the CDC streams for the specified YB-Master servers.

Tip

Use this command when setting up universe replication to verify if any tables are configured for replication. If not, run setup_universe_replication; if tables are already configured for replication, use alter_universe_replication to add more tables.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    list_cdc_streams
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

Example

./bin/yb-admin \
    -master_addresses 127.0.0.11:7100,127.0.0.12:7100,127.0.0.13:7100 \
    list_cdc_streams

delete_cdc_stream <stream_id> [force_delete]

Deletes underlying CDC stream for the specified YB-Master servers.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    delete_cdc_stream <stream_id [force_delete]>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • stream_id: The ID of the CDC stream.
  • force_delete: (Optional) Force the delete operation.

Note

This command should only be needed for advanced operations, such as doing manual cleanup of old bootstrapped streams that were never fully initialized, or otherwise failed replication streams. For normal xcluster replication cleanup, please use delete_universe_replication.

bootstrap_cdc_producer <comma_separated_list_of_table_ids>

Mark a set of tables in preparation for setting up universe level replication.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    bootstrap_cdc_producer <comma_separated_list_of_table_ids>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • comma_separated_list_of_table_ids: Comma-separated list of table identifiers (table_id).

Example

./bin/yb-admin \
    -master_addresses 172.0.0.11:7100,127.0.0.12:7100,127.0.0.13:7100 \
    bootstrap_cdc_producer 000030ad000030008000000000004000
table id: 000030ad000030008000000000004000, CDC bootstrap id: dd5ea73b5d384b2c9ebd6c7b6d05972c

Note

The CDC bootstrap ids are the ones that should be used with setup_universe_replication and alter_universe_replication.

Decommissioning commands

get_leader_blacklist_completion

Gets the tablet load move completion percentage for blacklisted nodes.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    get_leader_blacklist_completion
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    get_leader_blacklist_completion

change_blacklist

Changes the blacklist for YB-TServer servers.

After old YB-TServer servers are terminated, you can use this command to clean up the blacklist.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    change_blacklist [ ADD | REMOVE ] <ip_addr>:<port> \
    [ <ip_addr>:<port> ]...
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • ADD | REMOVE: Adds or removes the specified YB-TServer server.
  • ip_addr:port: The IP address and port of the YB-TServer.

Example

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    change_blacklist \
      ADD node1:9100 node2:9100 node3:9100 node4:9100 node5:9100 node6:9100

change_leader_blacklist

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    change_leader_blacklist < ADD | REMOVE > <ip_addr>:<port> \
    [<ip_addr>:<port>]...
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • ADD or REMOVE: Adds or removes nodes from blacklist.
  • ip_addr: The IP address of the node.
  • port: The port of the node.

leader_stepdown

Forces the YB-TServer leader of the specified tablet to step down.

Note

Use this command only if recommended by Yugabyte support.

There is a possibility of downtime.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    leader_stepdown <tablet_id> <dest_ts_uuid>
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • tablet_id: The identifier (ID) of the tablet.
  • dest_ts_uuid: The destination identifier (UUID) for the new YB-TServer leader. To move leadership from the current leader, when you do not need to specify a new leader, use "" for the value. If you want to transfer leadership intentionally to a specific new leader, then specify the new leader.

Note

If specified, des_ts_uuid becomes the new leader. If the argument is empty (""), then a new leader will be elected automatically. In a future release, this argument will be optional. See GitHub issue #4722

Rebalancing commands

For information on YB-Master load balancing, see Data placement and load balancing

For YB-Master load balancing flags, see Load balancing flags.

set_load_balancer_enabled

Enables or disables the load balancer.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    set_load_balancer_enabled [ 0 | 1 ]
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.
  • 0 | 1: Enabled (1) is the default. To disable, set to 0.

Example

./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    set_load_balancer_enabled 0

get_load_balancer_state

Returns the cluster load balancer state.

yb-admin \
    -master_addresses <master-addresses> get_load_balancer_state
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

get_load_move_completion

Checks the percentage completion of the data move.

You can rerun this command periodically until the value reaches 100.0, indicating that the data move has completed.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    get_load_move_completion
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

Note

The time needed to complete a data move depends on the following:

  • number of tablets and tables
  • size of each of those tablets
  • SSD transfer speeds
  • network bandwidth between new nodes and existing ones

For an example of performing a data move and the use of this command, refer to Change cluster configuration.

Example

In the following example, the data move is 66.6 percent done.

$ ./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    get_load_move_completion

Returns the following percentage:

66.6

get_is_load_balancer_idle

Finds out if the load balancer is idle.

Syntax

yb-admin \
    -master_addresses <master-addresses> \
    get_is_load_balancer_idle
  • master-addresses: Comma-separated list of YB-Master hosts and ports. Default value is localhost:7100.

Example

./bin/yb-admin \
    -master_addresses ip1:7100,ip2:7100,ip3:7100 \
    get_is_load_balancer_idle

Upgrade YSQL system catalog

upgrade_ysql

Upgrades the YSQL system catalog after a successful YugabyteDB cluster upgrade. YSQL upgrades are not required for clusters where YSQL is not enabled. Learn more about configuring YSQL flags here.

Syntax

yb-admin upgrade_ysql

Example

./bin/yb-admin upgrade_ysql

A successful upgrade returns the following message:

YSQL successfully upgraded to the latest version

In certain scenarios, a YSQL upgrade can take longer than 60 seconds, which is the default timeout value for yb-admin. To account for that, run the command with a higher timeout value:

$ ./bin/yb-admin \
      -timeout_ms 180000 \
      upgrade_ysql

Running the above command is an online operation and doesn't require stopping a running cluster. This command is idempotent and can be run multiple times without any side effects.

Note

Concurrent operations in a cluster can lead to various transactional conflicts, catalog version mismatches, and read restart errors. This is expected, and should be addressed by rerunning the upgrade command.

Refer Upgrade a deployment to learn about YB-Master and YB-Tserver upgrades, followed by YSQL system catalog upgrades.

  • Syntax
    • Online help
  • Commands
    • Universe and cluster commands
    • Table commands
    • Backup and snapshot commands
    • Multi-zone and multi-region deployment commands
    • Master-follower deployment commands
    • Read replica deployment commands
    • Security commands
    • Change data capture (CDC) commands
    • Decommissioning commands
    • Rebalancing commands
    • Upgrade YSQL system catalog
Ask our community
  • Slack
  • Github
  • Forum
  • StackOverflow
Yugabyte
Contact Us
Copyright © 2017-2022 Yugabyte, Inc. All rights reserved.