---
name: "crm_diff"
section: "8"
platform: "linux"
package: "pacemaker-cli-utils"
version: "3.0.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/crm_diff"
---

# crm\_diff(8)

Part of the Pacemaker cluster resource manager

## NAME

Pacemaker - Part of the Pacemaker cluster resource manager

## SYNOPSIS

crm\_diff original\_xml operation \[options\]

## DESCRIPTION

Compare two Pacemaker configurations (in XML format) to produce a custom diff-like output, or apply such an output as a patch

## OPTIONS

### Help Options:

- **-h**, **--help**

  Show help options

- **--help-all**

  Show all help options

- **--help-xml**

  Show original XML options

- **--help-operation**

  Show operation options

- **--help-additional**

  Show additional options

### Original XML:

- **-o**, **--original**=*FILE*

  XML is contained in the named file

- **-O**, **--original-string**=*STRING*

  XML is contained in the supplied string

### Operation:

- **-n**, **--new**=*FILE*

  Compare the original XML to the contents of the named file

- **-N**, **--new-string**=*STRING*

  Compare the original XML with the contents of the supplied string

- **-p**, **--patch**=*FILE*

  Patch the original XML with the contents of the named file

### Additional Options:

- **-c**, **--cib**

  Compare/patch the inputs as a CIB (includes versions details)

**-s**, **--stdin**

- **-u**, **--no-version**

  Generate the difference without versions details

### Application Options:

- \-$, **--version**

  Display software version and exit

- **-V**, **--verbose**

  Increase debug output (may be specified multiple times)

## EXAMPLES

Obtain the two different configuration files by running cibadmin on the two cluster setups to compare:

-

  \# cibadmin --query \> cib-old.xml

-

  \# cibadmin --query \> cib-new.xml

Calculate and save the difference between the two files:

-

  \# crm\_diff --original cib-old.xml --new cib-new.xml \> patch.xml

Apply the patch to the original file:

-

  \# crm\_diff --original cib-old.xml --patch patch.xml \> updated.xml

Apply the patch to the running cluster:

-

  \# cibadmin --patch -x patch.xml

## AUTHOR

Written by Andrew Beekhof and the Pacemaker project contributors
