v3.24.1

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Getting Started

    Overview
  • Quick Start
  • What Is The Things Stack?
  • Console
  • Subscription and Billing Management
  • Command-line Interface
  • Installing The Things Stack
  • Upgrading The Things Stack
  • Migrating to The Things Stack
    • Migrating End Devices between The Things Stack distributions
    • Migration Tool
    • Migrating End Devices from V2
      • Major Changes In The Things Stack
      • Packet Broker Requirements for End Device Migration
      • Migrate using the Console
      • Migrate using the Migration Tool
        • Migrate without Persisting Active Sessions
        • Migrate Active Sessions
      • Migrate using the V2 Takeout Tool
    • Import End Devices in The Things Stack
    • Fine-tuning MAC Settings for End Devices
    • Migrating Gateways
    • JSON File Reference
    • CSV File Reference
    • Migration FAQ
  • The Things Stack Cloud
  • The Things Stack AWS Launcher
  • The Things Stack on Kubernetes
  • The Things Join Server
  • The Things Network
  • Server Addresses
  • Packet Broker
  • Single Sign-On
  • Users and Organizations
  • Using the API
  • Working with Events
  • Troubleshooting Getting Started

Migrate using the Migration Tool

This section refers to migrating end devices to The Things Stack using ttn-lw-migrate migration tool.

Prerequisites

  1. ttn-lw-migrate tool version 0.5.0 or higher installed on your system. See the Migration Tool guide for detailed installation instructions.

Configure the Environment

First, you need to configure a few environmental variables. Navigate to the folder where you installed ttn-lw-migrate and execute the following, replacing ttn-v2-application-ID, ttn-v2-application-access-key, and the FREQUENCY_PLAN_ID value:

export TTNV2_APP_ID="ttn-v2-application-ID"
export TTNV2_APP_ACCESS_KEY="ttn-v2-application-access-key"
export FREQUENCY_PLAN_ID="EU_863_870_TTN"

See the list of supported Frequency Plans.

If using Windows OS Command Prompt, replace export with set and remove the double-quotes in commands above:

set TTNV2_APP_ID=ttn-v2-application-ID
set TTNV2_APP_ACCESS_KEY=ttn-v2-application-access-key
set FREQUENCY_PLAN_ID=EU_863_870_TTN

Commands are slightly different if using Windows PowerShell, for example you could set the TTNV2_APP_ID variable as follows:

$env:TTNV2_APP_ID='ttn-v2-application-ID'

Since migration is still possible only from a private The Things Industries V2 (SaaS) cluster, you need to configure one extra environmental variable:

export TTNV2_DISCOVERY_SERVER_ADDRESS="<instance-id>.thethings.industries:1900"

If the Discovery Server of your private The Things Industries V2 (SaaS) cluster does not use TLS, you will need to use ttnv2.discovery-server-insecure flag when running commands with the ttn-lw-migrate tool.

Export End Devices from V2

Next, you can proceed with exporting one or more end devices, with or without their active session, from V2 to a JSON file.

Note:
Migrating end devices from V2 to The Things Stack is a one-way process, since LoRaWAN devices may be handled by only one Network Server at a time.

Now, read the following subsections for detailed steps on how to migrate devices from V2 to The Things Stack using ttn-lw-migrate tool:

  • Without persisting active session (preferred migration path)
  • With persisting active session

Migrate without Persisting Active Sessions

This section explains how to export one or more of your end devices from V2 to a JSON file, without persisting their session.
Read

Migrate Active Sessions

Starting from The Things Stack version 3.12.0, it is possible to migrate end devices together with their active sessions using the ttn-lw-migrate tool. This section explains how to export one or more of your end devices from V2 to a JSON file, with persisting their active sessions.
Read
← Migrate using the Console Migrate without Persisting Active Sessions →

On this page

  • Prerequisites
  • Configure the Environment
  • Export End Devices from V2

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Nejra Selimović on 23 Dec 2021.
doc: Remove $ character from code blocks, add variables (#678)

Edit on Github