---
title: "Backup \u0026 Restore data with Influxdb"
description: "Backing up and restoring InfluxDB data in Opsview involves identifying and copying database shards for a specific time period. The process includes logging into the InfluxDB shell, locating the shard ID, and copying or restoring the shard files as needed."
url: "https://docs.itrsgroup.com/docs/faq/opsview/18108130764061-opsview-backup-restore-data-with-influxdb/index.html"
---
## Prerequisites

- `opsview-timeseries-influxdb` is installed

### Process

- Log in to your timeseries host as `root` (this is usually your [orchestrator](https://docs.itrsgroup.com/docs/faq/opsview/4920429084957-opsview-orchestrator/index.html) or your relevant InfluxDB server). (you might also want to take a snapshot if needed)

This article is to show you how to backup a database shard for a specific period you would like to take a backup

1. Log into the influx shell

```
$ influx
> use opsview
database changed
> show shards
```

2. Find the shard that has the period that you are looking for and get its ID (as per your time range) then

```
influxd backup -portable -shard <SHARDID> -db opsview /var/tmp/backup/influx
```

3. then copy the file to your local system or if needed restore to the other influxdb server (i.e the secondary if running HA) and restore

```
influxd restore -portable -shard <SHARDID> -db opsview /var/tmp/backup/influx
```

 This should do it, it is easy to do but applies to all hosts, so proceed with caution


