---
name: "barman-switch-wal"
section: "1"
platform: "linux"
package: "barman-cli"
version: "3.13.3-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/barman-switch-wal"
---

# barman-switch-wal(1)

Barman Sub-Commands

## NAME

barman-switch-wal - Barman Sub-Commands

## SYNOPSIS

```
switch-wal
    [ --archive ]
    [ --archive-timeout ]
    [ --force ]
    [ { -h | --help } ]
    SERVER_NAME [ SERVER_NAME ... ]
```

## DESCRIPTION

Execute **pg\_switch\_wal()** on the target server (Postgres versions 10 and later) or **pg\_switch\_xlog()** (for Postgres versions 8.3 to 9.6).

## PARAMETERS

- **SERVER\_NAME**

  Name of the server in barman node

- **--archive**

  Waits for one WAL file to be archived. If no WAL file is archived within a specified time (default: **30** seconds), Barman will terminate with a failure exit code. This option is also available on standby servers.

- **--archive-timeout**

  Specify the amount of time in seconds (default: **30** seconds) that the archiver will wait for a new WAL file to be archived before timing out. This option is also available on standby servers.

- **--force**

  Forces the switch by executing a CHECKPOINT before **pg\_switch\_wal()**.

  **NOTE:**

  Running a CHECKPOINT may increase I/O load on the Postgres server, so use this option cautiously.

- **-h / --help**

  Show a help message and exit. Provides information about command usage.

## AUTHOR

EnterpriseDB

## COPYRIGHT

© Copyright EnterpriseDB UK Limited 2011-2025
