Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Admin CLI

The Admin CLI provides helper commands for managing a docs.rs deployment. It connects directly to the database and S3, so it can theoretically run on a separate machine without direct access to the other running web or build-servers.

For task-oriented instructions that use these commands, see the common maintenance procedures.

Features

You can get help via:


Usage: docs_rs_admin <COMMAND>

Commands:
  build     
  database  Database operations
  queue     Interactions with the build queue
  cdn       
  help      Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

build subcommand

Usage: docs_rs_admin build <COMMAND>

Commands:
  set-toolchain  
  lock           Prevent builders from starting new builds
  unlock         Allow builders to start new builds
  help           Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

cdn subcommand

Usage: docs_rs_admin cdn <COMMAND>

Commands:
  purge  purge pages with a surrogate key from the CDN
  help   Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

database subcommand

Database operations

Usage: docs_rs_admin database <COMMAND>

Commands:
  migrate                       Run database migration
  alert                         Manage the alert popup shown to the users
  abnormality                   Manage the abnormality shown in the site header
  update-latest-version-id      temporary command to update the `crates.latest_version_id` field
  update-repository-fields      Updates GitHub/GitLab stats for crates
  backfill-repository-stats     Backfill GitHub/GitLab stats for crates
  update-crate-registry-fields  Updates info for a crate from the registry's API
  blacklist                     Blacklist operations
  limits                        Limit overrides operations
  help                          Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

queue subcommand

Interactions with the build queue

Usage: docs_rs_admin queue <COMMAND>

Commands:
  lock                    Pause registry polling for new crates
  unlock                  Resume registry polling for new crates
  add                     Add a crate to the build queue
  default-priority        Interactions with build queue priorities
  repository-priority     Interactions with repository-specific build priorities
  rebuild-broken-nightly  Queue rebuilds for broken nightly versions of rustdoc, either for a single date (start) or a range (start inclusive, end exclusive)
  help                    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help