Getting a list of background operations

Using the ydb operation list subcommand, you can get a list of background operations of the specified type.

General command format:

ydb [global options...] operation list [options...] <kind>
  • global optionsglobal parameters.

  • optionssubcommand parameters.

  • kind — operation type. Possible values:

    • analyzeANALYZE statistics collection operations
    • buildindex — index building operations
    • compaction — table compaction operations
    • export/s3 — export to S3 operations
    • export/nfs — export to NFS operations
    • import/s3 — import from S3 operations
    • import/nfs — import from NFS operations
    • scriptexec — script execution operations
    • incbackup — incremental backup operations
    • restore — restore from backup operations
    • setnotnull — operations for setting the NOT NULL limit.

View the description of the command for getting a list of background operations:

ydb operation list --help

Subcommand parameters

Name Description
-s, --page-size Number of operations per page. If the operation list contains more rows than specified in the --page-size parameter, the output will be split into multiple pages. To get the next page, specify the --page-token parameter.
-t, --page-token Page token.
--format Output format.
Default value — pretty.
Possible values:
  • pretty — human-readable format
  • proto-json-base64 — Protobuf output in JSON format, binary strings are encoded in Base64.

Examples

Note

The examples use the quickstart profile. To learn more, see Creating a profile to connect to a test database.

Get a list of background index building operations for the series table:

ydb -p quickstart operation list \
  buildindex

Result:

┌───────────────────────────────────────┬───────┬─────────┬───────┬──────────┬─────────────────────┬─────────────┐
| id                                    | ready | status  | state | progress | table               | index       |
├───────────────────────────────────────┼───────┼─────────┼───────┼──────────┼─────────────────────┼─────────────┤
| ydb://buildindex/7?id=281489389055514 | true  | SUCCESS | Done  | 100.00%  | /my-database/series | idx_release |
└───────────────────────────────────────┴───────┴─────────┴───────┴──────────┴─────────────────────┴─────────────┘

Next page token: 0