---
title: Back up data
description: Use the influx backup command to back up data and metadata stored in InfluxDB.
url: https://docs.influxdata.com/influxdb/v2/admin/backup-restore/backup/
estimated_tokens: 1024
product: InfluxDB OSS v2
version: v2
---

# Back up data

This page documents an earlier version of InfluxDB OSS. [InfluxDB 3 Core](/influxdb3/core/) is the latest stable version.

#### API token hashing is enabled by default in InfluxDB OSS 2.9.0

Stronger token security: tokens are stored as hashes on disk, so a copy of the database file doesn’t expose usable tokens. Existing tokens are hashed on first startup and the original strings can’t be recovered afterward — **capture any plaintext tokens you still need before you upgrade**.

For more information, see [Token hashing](/influxdb/v2/admin/tokens/#token-hashing).

#### Token hashing affects backup contents in InfluxDB 2.9.0+

A backup taken from a 2.9.0+ instance with the default settings doesn’t contain a plaintext operator token. To run a full restore of that backup, supply the operator token via [`influx restore --operator-token`](/influxdb/v2/reference/cli/influx/restore/#restore-a-backup-that-contains-hashed-tokens) (`influx-cli` v2.8.0+).

[Capture the operator token](/influxdb/v2/admin/tokens/#before-upgrading-to-290) you’ll use for restores **before** the first 2.9.0 startup.

Use the [`influx backup` command](/influxdb/v2/reference/cli/influx/backup/) to back up data and metadata stored in InfluxDB. InfluxDB copies all data and metadata to a set of files stored in a specified directory on your local filesystem.

#### InfluxDB 1.x/2.x compatibility

The InfluxDB 2.9 `influx backup` command is not compatible with versions of InfluxDB prior to 2.0.0. **For information about migrating data between InfluxDB 1.x and 2.9, see:**

-   [Automatically upgrade from InfluxDB 1.x to 2.9](/influxdb/v2/upgrade/v1-to-v2/automatic-upgrade/)
-   [Manually upgrade from InfluxDB 1.x to 2.9](/influxdb/v2/upgrade/v1-to-v2/manual-upgrade/)

The `influx backup` command **cannot** back up data stored in **InfluxDB Cloud**.

The `influx backup` command requires:

-   The directory path for where to store the backup file set
-   The **root authorization token** (the token created for the first user in the [InfluxDB setup process](/influxdb/v2/get-started/)).

##### Back up data with the influx CLI

```sh
# Syntax
influx backup <backup-path> -t <root-token>

# Example
influx backup \
  path/to/backup_$(date '+%Y-%m-%d_%H-%M') \
  -t xXXXX0xXX0xxX0xx_x0XxXxXXXxxXX0XXX0XXxXxX0XxxxXX0Xx0xx==
```

#### Related

-   [Restore data](/influxdb/v2/admin/backup-restore/restore/)
-   [influx backup](/influxdb/v2/reference/cli/influx/backup/)
