persist-tool(1) The persist-tool manual page persist-tool(1)

# [NAME](#NAME)

persist-tool - {{ site.product.short\_name }} configuration file

# [SYNOPSIS](#SYNOPSIS)

persist-tool \[command] \[options]

# [DESCRIPTION](#DESCRIPTION)

This manual page is only an abstract.

The persist-tool application is a utility that can be used to dump the content of the persist file, and manipulate its content.

\[](/assets/images/caution.png) **CAUTION:** Persist-tool is a special tool for syslog-ng experts. Do use the tool unless you know exactly what you are doing. Misconfiguring it will result in irrecoverable damage to the persist file, without any warning.

Limitations: * The persist-state functions can be used only with **SLP4** or newer persist files. Older persist files are not supported. * Wildcard characters are not supported in file and directory names.

# [THE DUMP COMMAND](#THE_DUMP_COMMAND)

```
dump [options] [persist_file]
```

Use the **dump** command to print the current content of the persist file in JSON format to the console.

The **dump** command has the following options: **--help** or **-?**  
Display a brief help message. For example:

````
```config


    persist-tool dump /Users/hofi/Develop/Balabit/syslog-ng/build/install/var/syslog-ng persist
``` 
A valid output is the following:
```config
run_id = { "value": "00 00 00 00 0C 00 00 00 " }
host_id = { "value": "00 00 00 00 5F 49 2F 01 " }
```
````

# [THE ADD COMMAND](#THE_ADD_COMMAND)

```
add [options] [input_file]
```

Use the **add** command to add or modify a specified state-entry in the persist file. The state-entry should be in the same format as the **dump** command displays it. If the given state-entry already exists, it will be updated. Otherwise, a new value will be added. If the given persist state is invalid, it will be skipped.

To use the **add** command: use **persist-tool dump** to print the content of the current persist file, and redirect it to a file. Edit the content of this file. Use **persist-tool** add with this file to modify the persist.

The **add** command has the following options: **--help** or **-?**  
Display a brief help message.

**--output-dir=&lt;directory&gt;** or **-o**  
Required parameter. The directory where the persist file is located at. The name of the persist file stored in this directory must be syslog-ng.persist.

**--persist-name=&lt;filename&gt;** or **-p**  
Optional parameter. The name of the persist file to generate. Default value: syslog-ng.persist. For example:

````
``` shell
/Users/hofi/Develop/Balabit/syslog-ng/build/install/bin/persist-tool add dump_persist -o .
```
A valid output is the following:
```config
log_reader_curpos(Application)      OK
affile_sd_curpos(/var/aaa.txt)        OK
```
An invalid output is the following:
```config
log_reader_curpos(Application)      OK
wrong
FAILED (error: Invalid entry syntax)
affile_sd_curpos(/var/aaa.txt)        OK
```
````

# [FILES](#FILES)

/Users/hofi/Develop/Balabit/syslog-ng/build/install/bin/persist-tool

# [SEE ALSO](#SEE_ALSO)

[**syslog-ng.conf**(5)](/man/os/syslog-ng/syslog-ng.conf.5)

**NOTE:** If you experience any problems or need help with syslog-ng OSE, see the *syslog-ng OSE Administration Guide*\[1], or visit the *syslog-ng OSE mailing list*\[2]. For news and notifications about syslog-ng OSE, visit the *syslog-ng OSE blogs*\[3].

# [AUTHOR](#AUTHOR)

This manual page was generated from the *syslog-ng OSE Administration Guide*\[1], which was written by several contributors to whom we'd like to extend our sincere thanks.

# [COPYRIGHT](#COPYRIGHT)

# [NOTES](#NOTES)

\[1] **syslog-ng OSE Administration Guide**  
⟨https://syslog-ng.github.io/admin-guide/README⟩

\[2] **syslog-ng OSE mailing list**  
⟨https://lists.balabit.hu/mailman/listinfo/syslog-ng⟩

\[3] **syslog-ng OSE blogs**  
⟨https://syslog-ng.com/blog/⟩

18 December 2025 4.10.2

---

Document: persist-tool(1) from syslog-ng 4.12.0-r3 (Chainguard OS)
Source: https://github.com/syslog-ng/syslog-ng
