Export existing logs on demand

task brazil Updated Nov 6, 2026 3 min read les-export-existing-logs-on-demand.md
Raw file servicenow.com

Replay historical log data from a supported table to a Hermes topic by creating and starting a Backfill Run. Use this process to export logs from a specific time range for analysis or archival.

Before you begin

Role required: admin or sn_logstoanalytics.admin

Before you begin:

  • Verify that the source table is present in the LES Sources allow-list.
  • Verify that the target topic belongs to the LES application scope.

About this task

By default, Log Export Service forwards a copy of log events to Hermes Messaging Service as those events are generated. Use a backfill run to replay historical rows from a supported log table for a bounded time range.

Each Backfill Run replays rows from one source table into one Hermes Messaging Service topic, in ordered batches. Only one active run per table is allowed at a time. After you start a run, its configuration is locked to prevent accidental edits.

Procedure

  1. Navigate to All > Log Export Service (LES) > Export Historical Data.

  2. Select New.

  3. On the form, fill in the fields.

Field

Description

Name

Name of the Backfill Run.

Table

Log source table whose historical rows you want to replay.

For more information on supported tables, see Log Sources.

Log level

A set of standard logging levels that can be used to control logging output. Each level forwards logs of equal or greater severity.

Log level options:

  • INFO - Forwards all logs
  • WARN - Forwards warnings and errors
  • ERROR - Forwards errors only Note: This field appears only when you select Table as the Source Type and the table is syslog.

Topic

Reference to the Hermes Messaging Service topic that the run publishes to. Select an existing topic, or create a topic through the lookup icon. For more information on creating a topic, see Create source type and multi topics in the LES source table.

Range Start

Earliest timestamp of the historical window to replay. Rows with a timestamp on or after Range Start are included.

Range End

Latest timestamp of the historical window to replay. Range End can be any time up to now and must be equal to or later than Range Start.

Max Rows

Optional cap on the total number of rows the run publishes. Leave blank to publish all rows in the range.

Batch Size

Number of rows the worker publishes per batch. The default is 1000.

Throttle Ms

Optional wait time, in milliseconds, between batches. The default is 0. Increase this value only when the source instance is under heavy load. Typical non-zero values range from 10 to 100 milliseconds.

Active

Indicates whether the Backfill Run is active.

Status

Current state of the run: New, Queued, Running, Completed, Error, or Cancelled. A background scheduler picks up queued runs approximately once every minute.

Status Detail

Plain-language summary of the current state.

Rows Published

Number of rows successfully published to the topic since the run started.

Rows Failed

Number of rows that failed to publish.

First Timestamp Sent

Timestamp of the first row published in this run. Set once when the run starts and does not change.

Last Timestamp Sent

Timestamp of the most recent row published. Updates as the run progresses.

First Sys Id Sent

Sys ID of the first row published in this run.

Last Sys Id Sent

Sys ID of the most recent row published.

Resolved Topic

Reference to the topic record that the Topic field resolved to.

4. Select **Submit**.
The **Status** field is set to **New**.
  1. Open the record and select Start.

    The Status field changes to Queued and then to Running when the scheduled worker picks it up. All input fields become read-only.

  2. To stop a run that has not finished, select Cancel while the Status is Queued or Running.

Result

When the run finishes, the Status field is set to Completed and the Status Detail field displays a summary such as "Backfill completed: forwarded 12,345 rows from syslog." If the run stops because of an error, the Status field is set to Error and the Status Detail field describes the cause.

You can also verify that logs are published to the topic using the Hermes topic inspector. For more information, see View a message in a Hermes topic.

Parent Topic:Administering Log Export Service (LES)

Search documentation
Search document titles and file paths on the brazil branch