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 options— global parameters. -
options— subcommand parameters. -
kind— operation type. Possible values:analyze— ANALYZE statistics collection operationsbuildindex— index building operationscompaction— table compaction operationsexport/s3— export to S3 operationsexport/nfs— export to NFS operationsimport/s3— import from S3 operationsimport/nfs— import from NFS operationsscriptexec— script execution operationsincbackup— incremental backup operationsrestore— restore from backup operationssetnotnull— operations for setting theNOT NULLlimit.
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: |
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