---
title: "The persist-tool manual page"
url: "https://axoflow.com/docs/axosyslog-core/4.28/app-man-syslog-ng/persist-tool.1/"
last_modified: "2026-09-24T12:23:53+02:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axosyslog-core/4.28/llms.txt).

# The persist-tool manual page

## Name

`persist-tool` — Display the content of the persist file

## Synopsis

`persist-tool [command] [options]`

## Description

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

WARNING: Persist-tool is a special tool for AxoSyslog experts. Do not 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

Wildcard characters are not supported in file/directory names.

## The dump command

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

`dump &lt;options&gt; &lt;persist_file&gt;`

Example: `persist-tool dump /opt/syslog-ng/var/syslog-ng.persist`

The output looks like:

```text
run_id = { "value": "00 00 00 00 0C 00 00 00 " }
host_id = { "value": "00 00 00 00 5F 49 2F 01 " }
```

The `dump` command has the following options:

- `--help` or `-?`

  Display a brief help message.

## The add command

`add &lt;options&gt; &lt;input_file&gt;`

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. Unless you also set the `--persist-name` option, the name of the persist file stored in this directory must be `syslog-ng.persist`.
- `--persist-name=&lt;persist_name&gt;` or `-p`

  The name of the persist file to modify. If you do not set this option, `persist-tool` uses the default `syslog-ng.persist` filename.

Example: `/opt/syslog-ng/bin/persist-tool add dump_persist -o .`

The valid output looks like:

```text
log_reader_curpos(Application)      OK
affile_sd_curpos(/var/aaa.txt)        OK
```

The invalid output looks like:

```text
log_reader_curpos(Application)      OK
wrong
FAILED (error: Invalid entry syntax)
affile_sd_curpos(/var/aaa.txt)        OK
```

## The generate command

`generate &lt;options&gt;`

Use the `generate` command to create an empty persist file. The generated file is always named `syslog-ng.persist`.

The `generate` command has the following options:

- `--force` or `-f`

  Overwrite the persist file if it already exists.

  **CAUTION:**

  Use this option with care: `persist-tool` does not ask for confirmation, and the contents of the overwritten persist file cannot be recovered.
- `--output-dir=&lt;directory&gt;` or `-o`

  The directory to generate the persist file into.

Example: `/opt/syslog-ng/bin/persist-tool generate -o /opt/syslog-ng/var`

## Files

`/opt/syslog-ng/bin/persist-tool`

## See also

[syslog-ng.conf.5](https://axoflow.com/docs/axosyslog-core/app-man-syslog-ng/syslog-ng.conf.5/)

[syslog-ng.8](https://axoflow.com/docs/axosyslog-core/app-man-syslog-ng/syslog-ng.8/)

## Getting help

- The up-to-date documentation of AxoSyslog is available on the [AxoSyslog documentation site](https://axoflow.com/docs/axosyslog-core/).
- For news and notifications about AxoSyslog, visit the [Axoflow blog](https://axoflow.com/blog/).
- If you want to contact the developers directly to help with problems or report issues, contact us on [Discord](https://discord.gg/583Z4wjem2) or [GitHub](https://github.com/axoflow/axosyslog/issues/).

This manual page is maintained by [Axoflow](https://axoflow.com/)

Last modified September 24, 2026: [Formatting fixes (41ac3715)](https://github.com/axoflow/axosyslog-core-docs/commit/41ac3715900e38f2bf235a3894033ec13edc4b72)
