https://github.com/chirpstack/chirpstack-v3-to-v4
Utility to migate ChirpStack v3 data into ChirpStack v4.
https://github.com/chirpstack/chirpstack-v3-to-v4
Last synced: 11 months ago
JSON representation
Utility to migate ChirpStack v3 data into ChirpStack v4.
- Host: GitHub
- URL: https://github.com/chirpstack/chirpstack-v3-to-v4
- Owner: chirpstack
- License: mit
- Created: 2022-04-18T13:43:26.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-11T09:56:16.000Z (over 1 year ago)
- Last Synced: 2025-04-07T07:26:28.381Z (about 1 year ago)
- Language: Go
- Size: 129 KB
- Stars: 8
- Watchers: 1
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ChirpStack v3 to v4 data-migration
This utility migrates data from a single ChirpStack Application Server instance
and one or multiple ChirpStack Network Server instances (in case of multiple-regions)
into the new ChirpStack v4 data-structure.
Help:
```
Usage:
chirpstack-v3-to-v4 [flags]
Flags:
--as-config-file string Path to chirpstack-application-server.toml configuration file
--cs-config-file string Path to chirpstack.toml configuration file
--deveui-list-file string Path to file containing DevEUIs to migrate (one DevEUI per line)
--device-profile-id-list-file string Path to file containing list of Device Profile IDs to migrate (one per line)
--device-session-ttl-days int Device-session TTL in days (default 31)
--disable-migrated-devices Disable migrated devices in ChirpStack v3
--drop-tenants-and-users Drop tenants and users before migration
-h, --help help for chirpstack-v3-to-v4
--migrate-applications Migrate applications (default true)
--migrate-device-metrics Migrate device metrics (default true)
--migrate-device-profiles Migrate device profiles (default true)
--migrate-devices Migrate devices (default true)
--migrate-gateway-metrics Migrate gateway metrics (default true)
--migrate-gateways Migrate gateways (default true)
--migrate-tenants Migrate tenants (default true)
--migrate-users Migrate users (default true)
--ns-config-file stringArray Path to chirpstack-network-server.toml configuration file (can be repeated)
```
Usage example:
```
./chirpstack-v3-to-v4 \
--cs-config-file /etc/chirpstack/chirpstack.toml \
--as-config-file /etc/chirpstack-application-server/chirpstack-application-server.toml \
--ns-config-file /etc/chirpstack-network-server/chirpstack-network-server.toml
```
**Warning:** Always make a backup before starting a migration. If the
`--drop-tenants-and-users` argument is used, then all data in the target
database will be removed!
## Notes
* This utility is compatible with the ChirpStack v4.11.x database schema. It
is **not** compatible with ChirpStack v4.12+. Users should migrate from v3
to the latest v4.11.x version, and after the migration upgrade to the latest
ChirpStack v4 version.
* This utility does not support [environment variables](https://www.chirpstack.io/docs/chirpstack/configuration.html#environment-variables) in configuration files, like ChirpStack does.
## Building from source
For creating a snapshot release:
```
make snapshot
```
For creating a release:
```
make release
```