---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/reference/ydb-cli/commands/bridge/failover.md?version=v25.4
  - https://ydb.tech/docs/ru/reference/ydb-cli/commands/bridge/failover.md?version=v25.4
  - href: en/reference/ydb-cli/commands/bridge/failover.md
    type: text/markdown
    title: Markdown version
  - href: ../../../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/reference/ydb-cli/commands/bridge/failover.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# admin cluster bridge failover

<!-- source: en/_includes/feature_enterprise.md -->
{% note info "Feature of Yandex Enterprise Database" %}

This functionality is available only in the [Yandex Enterprise Database](https://ydb.tech/docs/en/downloads/yandex-enterprise-database.md?version=v25.4). In the open-source version of YDB it is absent.

{% endnote %}
<!-- endsource: en/_includes/feature_enterprise.md -->

Use the `admin cluster bridge failover` command to perform [emergency disable](https://ydb.tech/docs/en/concepts/bridge.md?version=v25.4#failover) of a pile when it is unavailable. You can optionally specify the pile that will become the new `PRIMARY`.

<!-- source: en/reference/ydb-cli/commands/_includes/danger-warning.md -->
{% note alert %}

Commands in this section can harm your cluster if used incorrectly. Due to the potentially dangerous nature of these commands, **ALL** global parameters must be specified explicitly. Profiles are disabled by default and are only used when explicitly specified (`--profile <profile-name>`). Some commands do not require global options that are otherwise mandatory.

{% endnote %}
<!-- endsource: en/reference/ydb-cli/commands/_includes/danger-warning.md -->

General command syntax:

```bash
ydb [global options...] admin cluster bridge failover [options...]
```

* `global options` — [global parameters](https://ydb.tech/docs/en/reference/ydb-cli/commands/global-options.md?version=v25.4) for the CLI.
* `options` — [subcommand parameters](#options).

View command help:

```bash
ydb admin cluster bridge failover --help
```

## Subcommand parameters {#options}

#|
|| Name | Description ||
|| `--pile <pile>` | Name of the unavailable pile. ||
|| `--new-primary <pile>` | Name of the pile that should become the new `PRIMARY`. Specify if the unavailable pile was `PRIMARY`. ||
|#

## Requirements {#requirements}

- If the current `PRIMARY` is unavailable, you must specify `--new-primary` and choose a pile in the `SYNCHRONIZED` state. If `--new-primary` is missing or the chosen pile is not in `SYNCHRONIZED` state, the command returns an error without making any changes.
- The cluster will not enter an invalid state: if requirements are violated, the command makes no changes and reports an error.
- If the pile has not failed but you need to disable it, use [planned disable](https://ydb.tech/docs/en/concepts/bridge.md?version=v25.4#takedown) — the [`takedown`](https://ydb.tech/docs/en/reference/ydb-cli/commands/bridge/takedown.md?version=v25.4) command.

## Examples {#examples}

Perform emergency disable for an unavailable pile named `pile-a`:

```bash
ydb admin cluster bridge failover --pile pile-a
```

Perform emergency disable for an unavailable `PRIMARY` pile and designate a synchronized pile as the new `PRIMARY`:

```bash
ydb admin cluster bridge failover --pile pile-a --new-primary pile-b
```

### Verifying the result {#verify}

Use the [list](https://ydb.tech/docs/en/reference/ydb-cli/commands/bridge/list.md?version=v25.4) command to verify that the unavailable pile has been moved to `DISCONNECTED` and (if `--new-primary` was specified) a new `PRIMARY` has been selected:

```bash
ydb admin cluster bridge list

pile-a: DISCONNECTED
pile-b: PRIMARY
```
