Docs
test1test2
6.5
6.5
  • ElastiFlow Documentation
  • Unified Flow Collector
    • General Configuration
    • Changelog
    • Maxmind GeoIP2 and GeoLite2
    • RiskIQ PassiveTotal
    • Network Interfaces
    • User-Defined Metadata
    • Docker
    • Linux
    • Unified Flow Collector Introduction
    • System Requirements
    • Supported IEs
    • AWS VPC Flow Log IEs
    • IPFIX IEs
    • Netflow IEs
    • sFlow IEs
  • Unified SNMP Collector
    • Device Groups
    • Changelog
    • Devices
    • Downloading Definitions
    • Enumerations
    • Objects
    • Object Groups
    • User-Defined Metadata
    • Docker
    • Network Interfaces
    • United SNMP Collector Introduction
    • Linux
    • Scheduling Rediscovery
  • Monitoring ElastiFlow
    • Liveness & Readiness
    • Metrics
    • Prometheus & Grafana
  • Configuration Reference
    • YAML Configuration Files
    • Configuration Reference Overview
    • Common
      • API
      • Licensing
      • Overview
      • Logging
      • HTTP output
      • Elasticsearch output
      • Kafka output
      • Monitor output
      • OpenSearch output
      • Splunk output
      • stdout output
      • Processor
    • Unified Flow Collector
      • Overview
      • Community/Conversation IDs
      • EF_PROCESSOR_ENRICH_TOTALS_IF_NO_DELTAS
      • Overview
      • RiskIQ PassiveTotal
      • Maxmind
      • User-Defined Metadata
      • Overview
      • Overview
      • User-Defined Metadata
      • Overview
      • Benchmark Input
      • Netflow/IPFIX/sFlow (UDP)
      • Licensing
      • Decoder/Processor
      • Sample Rate
      • Configuration Changes
    • Unified SNMP Collector
      • User-Defined Metadata
      • Overview
      • Licensing
      • SNMP Poller
      • EF_PROCESSOR_SNMP_ENUM_DEFINITIONS_DIRECTORY_PATH
  • API Reference
    • API Reference Overview
    • SNMP Operations
  • Data Platforms
    • Elastic
      • Basic Cluster
      • Advanced Cluster
      • Single Server
      • Multi-Tier Cluster
      • Single "Lab" Server
      • Elasticsearch
      • ElastiFlow vs. Filebeat and Logstash
      • RHEL/CentOS
      • Ubuntu/Debian
      • Kibana
      • ML
        • Network Security
        • Machine Learning
        • Availability
          • Network Availability
          • DHCP
          • LDAP
          • DNS
          • NTP
          • RADIUS
          • TCP Sessions
        • Network Security Activity
          • Rare Autonomous System
          • Network Activity
          • Rare Conversation
          • Rare Geolocation
        • Network Security Brute Force
          • Brute Force CLI Access
          • Brute Force Remote Desktop Access
          • Brute Force Attacks
        • Network Security DDoS
          • Denial-of-Service
          • ICMP Flood Attack
          • SYN Flood Attack
          • TCP DDoS Attack
          • UDP Amplification Attack
        • Network Security Recon
          • ICMP Scan
          • Reconnaissance
          • Port Scan
        • Performance
          • Unusual ASN Traffic Volume
          • Unusual Network Interface Traffic Volume
          • Network Performance
    • Opensearch
      • Dashboards
      • Auth Sig V4
    • Splunk
      • Default Search Macro
      • Configuring Data Input & Index
      • Splunk App Installation
    • Output Configuration
  • Additional Guides
    • Catalyst (sFlow)
    • FortiGate
    • hsflowd
    • Configuring Flow Sampling on Juniper Routers
    • Junos OS (sFlow)
    • MikroTik RouterOS
    • OpenWRT (softflowd)
    • Ubiquiti EdgeRouter
    • SonicWall
    • Junos OS
    • Extending SNMP Device Support
    • Flow Device Support Overview
    • SNMP Device Support Overview
    • Generating A Support Bundle
  • FAQ
    • Flows stopped showing up in Kibana (Disk(s) Full)
    • Common reasons why you have discrepancies between ElastiFlow data & reality
    • What Are Snapshots?
    • Importing the wrong dashboards (No data)
  • Knowledge Base
    • Config
      • Elasticsearch Authentication Failure
      • CA Certificate Path Incorrect
      • license/error Invalid Segments
    • Flow
      • Bidirectional Flow Support
      • Configure the UDP Input
      • Flow Records Not Received
      • Netflow v9/IPFIX Template Not Receieved
      • Unsupported sFlow Structures
    • General
      • License Has Expired
      • License Agreement Not Accepted
    • Install
      • .deb Upgrade Fails File Overwrite
    • Operation
      • Flow Collector Queues 90% Full
      • Dashboard Updates
      • Change elastiflow-* Index Name?
  • Elastic Stack Deployment
  • Download Links
Powered by GitBook
On this page
  • Setup Snapshot & Restore via Kibana
  • Register a repository
  • Create a snapshot - Kibana
  • Monitor snapshot progress
  • Restore a snapshot - Kibana
  • Monitor restore progress - Kibana
  • Setup Snapshot & Restore via API
  • Install required plugins (optional)
  • Register a snapshot repository
  • Create a snapshot - API
  • Monitor snapshot progress (optional)
  • Retrieve snapshot information
  • Restore a snapshot - API
  • Monitor restore progress - API
  1. FAQ

What Are Snapshots?

PreviousCommon reasons why you have discrepancies between ElastiFlow data & realityNextImporting the wrong dashboards (No data)

Elasticsearch Snapshots allow you to create backups of your Elasticsearch indices and cluster metadata. These backups are stored in a remote or local repository (such as a local or remote file system, Microsoft Azure, Amazon S3, or Google Cloud Storage). The snapshots can then be used to restore data in case of data loss, or cluster migrations.

The main components and concepts of Elasticsearch Snapshot and Restore include:

  1. Snapshot: A snapshot is a backup of one or more Elasticsearch indices, including all the data and metadata associated with them. Snapshots are incremental, meaning they only store data that has changed since the last snapshot. This makes them more space-efficient and faster to create compared to full backups.

  2. Repository: A repository is a storage location where snapshots are saved. It can be a local file system, a remote file system, or a cloud-based storage service (such as Amazon S3, Microsoft Azure or Google Cloud Storage). Repositories need to be registered with Elasticsearch before they can be used for snapshot and restore operations.

  3. Restore: The restore process involves retrieving a snapshot from a repository and applying it to the Elasticsearch cluster. This process can be used to recover lost data, migrate data to a new cluster, or to create a new cluster with the same data as the source cluster.

Snapshot and Restore is an essential tool for Elasticsearch cluster administration and disaster recovery, as it provides an efficient and reliable way to back up and recover your Elasticsearch data.

Setup Snapshot & Restore via Kibana

If you will be using a shared file system you must add "path.repo: /your/path/here" to elasticsearch.yml make sure you have read/write permissions to this path before proceeding

  1. Access Kibana: Open Kibana in your web browser by navigating to the Kibana URL. (typically ))

  2. Open Stack Management: Click on the "Stack Management" tab on the left-hand side of the Kibana UI.

  3. Navigate to Snapshot and Restore: In the Stack Management menu, click on "Snapshot and Restore" under the "Data" section.

image

Register a repository

  1. Before creating snapshots, you need to register a snapshot repository. Click on the "Repositories" tab and then click the "Register a repository" button.

  2. Choose a repository type (e.g., Shared file system, Microsoft Azure, Amazon S3, or Google Cloud Storage) and be ready to provide the necessary settings, such as the repository location, access keys, and bucket name (depending on the repository type). We will be registering a remote NFS share that we've already mounted on the server and added to the path.repo field in our elasticsearch.yml configuration file. We will give our Repository a name select "Shared file system" and click next.

    (Note: If you're using Azure, S3 or GCS, make sure you've already installed the required plugins on your Elasticsearch cluster.)

  3. We will now use the path.repo settings we previously added to elasticsearch.yml in the "Location" field, specify our Chunk size, Max snapshots bytes per second, Max restore bytes per second and click register.

  4. Now click on verify repository to verify everything is working as expected and Elasticsearch can connect:

Create a snapshot - Kibana

Monitor snapshot progress

Restore a snapshot - Kibana

Monitor restore progress - Kibana

Setup Snapshot & Restore via API

Install required plugins (optional)

Some repository types, like S3 or GCS, require installing plugins. Install the required plugin for your chosen repository type using the following command:

(Replace repository-s3 with the appropriate plugin name for your chosen repository type.)

bin/elasticsearch-plugin install repository-s3

Register a snapshot repository

To create and manage snapshots, you need to register a snapshot repository. Choose a repository type that suits your needs (e.g., fs for local file system, s3 Amazon S3, or gcs for Google Cloud Storage).

Example: Registering an fs (file system) repository:

PUT /_snapshot/my_backup_repository
{
"type": "fs",
"settings": {
"location": "/path/to/your/backup/directory",
"compress": true
}
}

Replace /path/to/your/backup/directory with the path to your desired backup directory.

Create a snapshot - API

To create a snapshot, use the following API call:

PUT /_snapshot/my_backup_repository/snapshot_name?wait_for_completion=true

Replace my_backup_repository with your repository name and snapshot_name with a unique name for your snapshot. The wait_for_completion=true parameter makes the API call wait until the snapshot is created.

Monitor snapshot progress (optional)

You can monitor the progress of a snapshot by calling the following API:

GET /_snapshot/my_backup_repository/snapshot_name/_status

Replace my_backup_repository and snapshot_name with your repository and snapshot names, respectively.

Retrieve snapshot information

You can retrieve information about a specific snapshot or all snapshots in a repository using the following API call:

GET /_snapshot/my_backup_repository/snapshot_name

Replace my_backup_repository and snapshot_name with your repository and snapshot names, respectively.

Restore a snapshot - API

To restore a snapshot, use the following API call:

POST /_snapshot/my_backup_repository/snapshot_name/_restore

Replace my_backup_repository and snapshot_name with your repository and snapshot names, respectively. You can also specify additional parameters, like indices or rename_pattern, to customize the restore operation.

Monitor restore progress - API

You can monitor the progress of a restore operation by calling the following API:

GET /_cat/recovery?v&active_only=true

This command will return information about ongoing restore operations.

By following these steps, you can enable and use Elasticsearch Snapshot and Restore to create snapshots of your indices and restore them as needed.

image
image
image
image
image

Click on the "Policies" tab, and then click the "Create policy" button.

Choose the repository you registered earlier, provide a unique snapshot name, and select the time interval you would like to take snapshots.

Next configure the data streams and/or indices you would like to snapshot. I have unchecked All and used an index pattern of elastiflow*. This will cover all ElastiFlow indices. Next configure whether you would like to ignore unavailable indices, allow partial indices, include global and feature states then click next.

Next configure your snapshot retention policy. I will be deleting snapshots after 4 days with a maximum of 100 snapshots.

Review your policy and when ready click "Save policy"

Once this policy is saved you can manually run it by selecting the "Run now" button followed by "Run policy".

You can monitor the progress of a snapshot by clicking on its name in the "Snapshots" tab. This will show the snapshot's details, including the current status and progress.

To restore a snapshot, click on the snapshot name in the "Snapshots" tab and then click the "Restore" button. You can choose which indices to restore and customize the restore operation with additional settings, like renaming indices or changing index settings.

Uncheck "All data streams and indices" unless you would like to restore everything included in the snapshot then manually select the indices you wish to restore. If you would like to rename indices, partially restore indices, or restore aliases this is where you would configure these options:

This is where you would override index settings saved when the snapshot was taken:

Click "Restore snapshot" to start the restore process.

You can monitor the progress of a restore operation by navigating to the "Restore Status" tab:

⚠️
http://your_kibana_host:5601