转自:https://blog.timescale.com/migrate-outflux-a-smart-way-out-of-influxdb/

Migrate your workload from InfluxDB to TimescaleDB with just a single command

Users are often asking us how to migrate off of InfluxDB because they want the reliability and flexibility of TimescaleDB. To make it easier for them, we are introducing a new migration tool called Outflux.

Designed to help users seamlessly migrate from InfluxDB to TimescaleDB, Outflux is built in a modular fashion, enabling users to either migrate schema or data or both directly into TimescaleDB. It’s easy to use, configurable, and most importantly, it’s fast.

In this post, we will first cover the motivations behind creating Outflux, then dive deeper into how we built it, how it works, and how to get started.

[Or jump straight to the tutorial.]

Why we created Outflux

We give props to InfluxData for being an early entry in the time-series database market, but as with any technology, one-size does not fit all. Aside from receiving feedback from our users, we also saw a visible market gap between the services InfluxDB provides, and what users actually need (which led to the birth of TimescaleDB).

Early on we recognized that working with IoT data was a whole new ballgame than the DevOps workloads InfluxDB is designed for. The ability to combine your time-series data with your relational data (and often, geo-spatial data) is becoming increasingly important for organizations. TimescaleDB is optimized for these types of workloads and gives organizations the option to scale from the cloud to the edge.

We’d also be remiss not to touch on the fact that TimescaleDB is built on the SQL open-standard. This allows organizations to unify under a single query language that is well known among developers across the globe. InfluxData initially decided to create their own SQL-like query language called InfluxQL, but that had quirks and gotchas that tripped up developers. Then they created a new language, Flux, to solve the issues associated with InfluxQL. Now their users are faced with learning a whole new language which creates a split ecosystem and even more confusion. Not ideal. (More on SQL vs. Flux here.)

We’ve benchmarked TimescaleDB against InfluxDB and encourage you to review the results. You might just find that InfluxDB is satisfactory for your needs, or you might decide that it’s time for an upgrade and switch to TimescaleDB.

How we built Outflux & how it works

After some careful evaluation and research, we discovered that several API clients exist for InfluxDB for a variety of programming languages including Python and Go. The Go client is maintained by InfluxData themselves, and using this API client allowed us to tailor the tool to our needs.

We found that we could control:

  • The amount of data being selected from the InfluxDB server
  • Which data (configurably) is exported
  • The input format for TimescaleDB (and additional transformations before inserting)
  • The concurrency level

From here, we built outflux as a series of libraries connected in one CLI that selects data from InfluxDB using their HTTP API, discovers and transforms the data schema, and imports it into TimescaleDB concurrently.

Underneath the covers, Outflux implements an Extraction Pipeline that has three stages:

  • Extractor: where Outflux queries the input database (InfluxDB) by selecting data specified by the user and converting it into an intermediate format
  • Transformation Chain: where configurable changes can be made to the data (i.e. castings, filters, column generation) while preserving the intermediate format
  • Injector: where the specific code for the receiving database resides (Outflux knows how to transform the intermediate/neutral format and insert it)

Each of the components work independently of each other in a separate coroutine/thread. Multiple pipelines can be used to export each measurement in a concurrent fashion. The Extraction Pipelines are spawned, joined and managed by the main Outflux component. The figure below illustrates the data flow once the Extraction Pipeline is in place.

Getting started

Now that you know more about Outflux’s internal framework, you are ready to get started! Outflux is an open-source tool and the code is available on GitHub in a public repository.

Using the tool is easy and involves just a simple command: `migrate`. Outflux manages the schema discovery, validation, and creation. It also handles exporting and importing data from an input database to an output database.

Before you begin setting up Outflux you need to ensure you have 1) a running instance of InfluxDB at a known location and a means to connect to it and 2) TimescaleDB installed and a means to connect to it.

If all the pre-requirements are met, you can begin installing Outflux by...

  • Visiting the releases section of the repository
  • Downloading the latest compressed tarball for your platform
  • Extracting it to a preferred location

If you navigate to where you extracted the archive and execute:

$ ./outflux --help
Outflux offers the capabilities to migrate an InfluxDB database, or specific measurements to TimescaleDB. It can also allow a user to transfer only the schema of a database or measurement to TimescaleDB Usage:
outflux [command] Available Commands:
help Help about any command
migrate Migrate the schema and data from InfluxDB measurements into TimescaleDB hypertables
schema-transfer Discover the schema of measurements and validate or prepare a TimescaleDB hyper-table with the discovered schema

You will see the help output for Outflux, a brief explanation of what it can do, the usage, and available commands.

For instructions on how to set up Outflux from source, you can visit the README. For step-by-step instructions on how to get started, please read our tutorial.

Note: Outflux currently only supports bulk migrations. Live, continuous migrations from InfluxDB will be supported with other upcoming solutions.

Next steps

Are you ready to migrate off of InfluxDB and upgrade to TimescaleDB? Yes? We thought so! As mentioned above, you can follow the tutorial for in-depth instructions. Be sure to check out the Outflux page for more information and ways to contact us.

If you are new to TimescaleDB, follow these installation instructions. (Note: If you are just getting started, we encourage you to check out our features matrix to see which version of TimescaleDB is best for you.)

FAQs

How much does Outflux cost?

Outflux is free to use! TimescaleDB is also free to use, but if you are looking to upgrade to TimescaleDB Enterprise, we offer different pricing options based on your needs.

Can you tell me more about the differences between TimescaleDB vs InfluxDB?

Of course! We’ve benchmarked TimescaleDB vs InfluxDB and you can read the results on our whitepaper.

What is the difference between SQL and Flux?

We are glad you asked! Read this post to learn all about the two query languages.

Does Outflux do migrations in a live fashion?

No, Outflux currently only supports bulk migrations, so active inserts into InfluxDB after Outflux is used will not migrate over. Continuous migrations from InfluxDB will be supported with other upcoming solutions.

 
 
 
 

Introducing Outflux: a smart way out of InfluxDB的更多相关文章

  1. 使用outflux 导入influxdb 的数据到timescaledb

    influxdb 以及timescaledb 都是不错的时序数据库,timescaledb 团队提供了直接从influxdb 导入 环境准备 docker-compose 文件 version: &q ...

  2. Introducing Makisu: Uber’s Fast, Reliable Docker Image Builder for Apache Mesos and Kubernetes

    转自:https://eng.uber.com/makisu/?amp To ensure the stable, scalable growth of our diverse tech stack, ...

  3. Smart/400开发上手1:入门

    1.介绍 Smart/400是在AS/400之上的开发平台,管理开发.运维的全生命周期. 2.设计基础 Introducing Fields Smart通过字段字典Field Dictionary来存 ...

  4. Method and apparatus for establishing IEEE 1588 clock synchronization across a network element comprising first and second cooperating smart interface converters wrapping the network element

    Apparatus for making legacy network elements transparent to IEEE 1588 Precision Time Protocol operat ...

  5. Building Applications with Force.com and VisualForce (DEV401)(五):Application Essential: Introducing Business Logic

    Dev 401-005 Application Essential: Introducing Business Logic Module Agenda1.Custom object Queues2.W ...

  6. Smart Tag——DevExpress WPF初探

    Smart Tag是一个设计时扩展,所有标准控件均自带这个功能,当然也包括 DevExpress WPF Controls .可以快速设置控件的值或者绑定最重要的属性.它还可以帮助你完成一些重复的工作 ...

  7. 【容器云】十分钟快速构建 Influxdb+cadvisor+grafana 监控

    本文作者:七牛云布道师@陈爱珍,DBAPlus社群联合发起人.前新炬技术专家.多年企业级系统的应用运维及分布式系统实战经验.现专注于容器.微服务及DevOps落地的研究与实践. 安装过程 三个都直接下 ...

  8. International Conference for Smart Health 2015 Call for Papers

    Advancing Informatics for healthcare and healthcare applications has become an international researc ...

  9. Call for Papers International Conference for Smart Health (ICSH) 2014

    Call for PapersInternational Conference for Smart Health (ICSH) 2014 Beijing, China July 10-11, 2014 ...

随机推荐

  1. GridView(多选功能)

    多选功能  将optionSelection下的MultiSelect修改为true开启多选,MultiSelectMode有三种模式可选,单元格选择,行选择,与checkBox选择,第三种选择方式会 ...

  2. java static关键字的使用

    static关键字    通常来说,创建类的时候,是用new创建此类的对象才可以获得,执行new创建对象时数据存储空间才被分配,其方法才被外界调用    有两种情况用new无法解决:        1 ...

  3. web项目中web.xml简介

    什么是 XML? XML 指可扩展标记语言(EXtensible Markup Language) XML 是一种标记语言,很类似 HTML XML 的设计宗旨是传输数据,而非显示数据 XML 标签没 ...

  4. Mysql和Hadoop+Hive有什么关系?

    1.Hive不存储数据,Hive需要分析计算的数据,以及计算结果后的数据实际存储在分布式系统上,如HDFS上. 2.Hive某种程度来说也不进行数据计算,只是个解释器,只是将用户需要对数据处理的逻辑, ...

  5. python基础15上_迭代器_生成器

    # 迭代器和生成器 # 迭代器: # 双下方法 : 很少直接调用的方法.一般情况下,是通过其他语法触发的 # 可迭代的 —— 可迭代协议 含有__iter__的方法('__iter__' in dir ...

  6. 无线局域网(WLAN)

    无线局域网根据结构可以分为两大类:有固定基础设施的无线局域网和无固定基础设施的局域网. 有固定基础设施是指网络中已经预先存在了一批固定的数据处理和转发设备,这些固定设备可以通过有线方式连接其他网络或 ...

  7. css设置两行多余文字用..显示

    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all;

  8. Python 3 Anaconda 下爬虫学习与爬虫实践 (2)

    下面研究如何让<html>内容更加“友好”的显示 之前略微接触的prettify能为显示增加换行符,提高可阅读性,用法如下: import requests from bs4 import ...

  9. sort()的用法,参数以及排序原理(转载)

    sort() 方法用于对数组的元素进行排序,并返回数组.默认排序顺序是根据字符串Unicode码点.语法:arrayObject.sort(sortby):参数sortby可选.规定排序顺序.必须是函 ...

  10. (转)hibernate 之hiberante.hbm2ddl.auto 参数的配置

    我们在搭建环境的时候,在配置文件中有一个属性标签为: 完整配置如下 <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernat ...