BARMAN-KEEP(1)

NAME
barman-keep - Barman Sub-Commands

SYNOPSIS

            keep
                [ { -h | --help } ]
                { { -r | --release } | { -s | --status } | --target { full | standalone } }
                SERVER_NAME BACKUP_ID

DESCRIPTION

Mark the specified backup with a target as an archival backup to be retained indefinitely, overriding any active retention policies. You can also check the keep status of a backup and release the keep mark from a backup. You can use a shortcut instead of BACKUP_ID.

Note:
        Incremental backups are not eligible for the keep command. This restriction exists because incremental backups rely on their parent backups and cannot be used on their own for recovery. Keeping an incremental without its base would serve no purpose, as it is unusable independently.

        If you attempt to apply keep to an incremental backup, Barman will return an error indicating that incremental backups cannot be kept.

        Only the full base backup —the one that starts the backup chain— can be marked with keep.

PARAMETERS

    SERVER_NAME
        Name of the server in barman node

    BACKUP_ID
        Id of the backup in barman catalog.

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

    -r / --release
        Release the keep mark from this backup. This will remove its archival status and make it available for deletion, either directly or by retention policy.

    -s / --status
        Report the archival status of the backup. The status will be either full or standalone for archival backups, or nokeep for backups that have not been designated as archival.

    --target
        Define the recovery target for the archival backup. The possible values are:

        •   full: The backup can be used to recover to the most recent point in time. To support this, Barman will keep all necessary WALs to maintain the backup's consistency as well as any subsequent WALs.

        •   standalone: The backup can only be used to restore the server to its state at the time of the backup. Barman will retain only the WALs required to ensure the backup's consistency.

SHORTCUTS

Use shortcuts instead of BACKUP_ID.
Shortcut | Description
first/oldest | Oldest available backup for the server, in chronological order.
last/latest | Most recent available backup for the server, in chronological order.
last-full/latest-full | Most recent full backup taken with methods rsync or postgres.
last-failed | Most recent backup that failed, in chronological order.

Author
EnterpriseDB

Copyright
© Copyright EnterpriseDB UK Limited 2011-2025