Giter Site home page Giter Site logo

influxdb-backup.sh's Introduction

Dump and Restore for InfluxDB

influxdb-backup.sh is a simple bash script which uses curl and jq to dump and restore all the points in an influxdb database.

  • ./influxdb-backup.sh dump fetches all points from a database and outputs them as line-delimited JSON to stdout.
  • ./influxdb-backup.sh restore reads a dump from stdin and writes all points to a database one by one.

Installation

Download influxdb-backup.sh to your computer and make it executable:

$ curl https://raw.githubusercontent.com/eckardt/influxdb-backup.sh/master/influxdb-backup.sh -o influxdb-backup.sh && chmod +x ./influxdb-backup.sh && ./influxdb-backup.sh -?

Usage

To copy all datapoints (all series) from one database to another do:

$ ./influxdb-backup.sh dump oldDB | ./influxdb-backup.sh restore newDB

See ./influxdb-backup.sh dump -? for more usage information:

Usage: ./influxdb-backup.sh dump DATABASE [options...]
	-u USERNAME	(default: root)
	-p PASSWORD	(default: root)
	-h HOST		(default: localhost:8086)
	-s		(use HTTPS)

influxdb-backup.sh's People

Contributors

eckardt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.