> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# backup_* server settings

> ClickHouse server settings in the backup_* generated group.

These settings configure the ClickHouse server and are autogenerated from ClickHouse source.

## backup\_log

Settings for the [backup\_log](https://clickhouse.com/docs/reference/system-tables/backup_log.md) system table for logging `BACKUP` and `RESTORE` operations.

The following settings can be configured by sub-tags:

| Setting | Description | Default | Note |
| - | - | - | - |
| `database` | Name of the database. | | |
| `table` | Name of the system table. | | |
| `engine` | [MergeTree Engine Definition](https://clickhouse.com/docs/reference/engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table) for a system table. | | Cannot be used if `partition_by` or `order_by` defined. If not specified `MergeTree` is selected by default |
| `partition_by` | [Custom partitioning key](https://clickhouse.com/docs/reference/engines/table-engines/mergetree-family/custom-partitioning-key.md) for a system table. | | If `engine` is specified for system table, `partition_by` parameter should be specified directly inside 'engine' |
| `ttl` | Specifies the table [TTL](https://clickhouse.com/docs/reference/engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl). | | If `engine` is specified for system table, `ttl` parameter should be specified directly inside 'engine' |
| `order_by` | [Custom sorting key](https://clickhouse.com/docs/reference/engines/table-engines/mergetree-family/mergetree.md#order_by) for a system table. Can't be used if `engine` defined. | | If `engine` is specified for system table, `order_by` parameter should be specified directly inside 'engine' |
| `storage_policy` | Name of the storage policy to use for the table (optional). | | If `engine` is specified for system table, `storage_policy` parameter should be specified directly inside 'engine' |
| `settings` | [Additional parameters](https://clickhouse.com/docs/reference/engines/table-engines/mergetree-family/mergetree.md#settings) that control the behavior of the MergeTree (optional). | | If `engine` is specified for system table, `settings` parameter should be specified directly inside 'engine' |
| `flush_interval_milliseconds` | Interval for flushing data from the buffer in memory to the table. | `7500` | |
| `max_size_rows` | Maximal size in lines for the logs. When the amount of non-flushed logs reaches the max\_size, logs are dumped to the disk. | `1048576` | |
| `reserved_size_rows` | Pre-allocated memory size in lines for the logs. | `8192` | |
| `buffer_size_rows_flush_threshold` | Threshold for amount of lines. If the threshold is reached, flushing logs to the disk is launched in background. | `max_size_rows / 2` | |
| `flush_on_crash` | Sets whether logs should be dumped to the disk in case of a crash. | `false` | |

All settings except `database`, `table` and `engine` can also be set once for all system log tables in the `system_tables` section. A setting inside a particular table's section takes precedence, and a per-table `engine` replaces the whole engine definition, including the global `partition_by`, `ttl`, `order_by`, `storage_policy` and `settings`:

```xml theme={null}
<system_tables>
    <ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</system_tables>
```

The `system_tables` section additionally accepts the following setting, which applies to all system log tables and cannot be set per table:

| Setting | Description | Default |
| - | - | - |
| `skip_alias_columns` | When `true`, ALIAS columns are omitted from system log table schemas. Required for S3-backed system logs. | `false` |

The previous location of this setting, `default_system_log_flush_policy.skip_alias_columns`, is deprecated and is used only if `system_tables.skip_alias_columns` is not set.

**Example**

```xml theme={null}
<clickhouse>
    <backup_log>
        <database>system</database>
        <table>backup_log</table>
        <flush_interval_milliseconds>1000</flush_interval_milliseconds>
        <partition_by>toYYYYMM(event_date)</partition_by>
        <max_size_rows>1048576</max_size_rows>
        <reserved_size_rows>8192</reserved_size_rows>
        <buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
        <flush_on_crash>false</flush_on_crash>
        <!-- <engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + INTERVAL 30 day</engine> -->
    </backup_log>
</clickhouse>
```

## backup\_threads

Type NonZeroUInt64 Default 16 Changeable without restart NoThe maximum number of threads to execute `BACKUP` requests.
