Skip to content

Commit 399f9f6

Browse files
committed
Initial commit.
0 parents  commit 399f9f6

File tree

11 files changed

+4856
-0
lines changed

11 files changed

+4856
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Binary
2+
chirpstack-v3-to-v4
3+
4+
# Hidden files
5+
.*
6+
!.gitignore
7+
8+
# Config files
9+
*.toml

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2022 Orne Brocaar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.PHONY: proto build
2+
3+
build:
4+
go build
5+
6+
proto:
7+
protoc --go_out=. --go_opt=paths=source_relative pbold/pb.proto
8+
protoc --go_out=. --go_opt=paths=source_relative pbnew/pb.proto

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ChirpStack v3 to v4 data-migration
2+
3+
This utilty migrates data from a single ChirpStack Application Server instance
4+
and one or multiple ChirpStack Network Server instances (in case of multiple-regions)
5+
into the new ChirpStack v4 data-structure.
6+
7+
Help:
8+
9+
```
10+
Usage:
11+
chirpstack-v3-to-v4 [flags]
12+
13+
Flags:
14+
--as-config-file string Path to chirpstack-application-server.toml configuration file
15+
--cs-config-file string Path to chirpstack.toml configuration file
16+
--device-session-ttl-days int Device-session TTL in days (default 31)
17+
-h, --help help for chirpstack-v3-to-v4
18+
--ns-config-file stringArray Path to chirpstack-network-server.toml configuration file (can be repeated)
19+
```
20+
21+
Usage example:
22+
23+
```
24+
./chirpstack-v3-to-v4 \
25+
--cs-config-file /etc/chirpstack/chirpstack.toml \
26+
--as-config-file /etc/chirpstack-application-server/chirpstack-application-server.toml \
27+
--ns-config-file /etc/chirpstack-network-server/chirpstack-network-server.toml
28+
```

go.mod

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module github.com/chirpstack/chirpstack-v3-to-v4
2+
3+
go 1.16
4+
5+
require (
6+
github.com/brocaar/lorawan v0.0.0-20220207095711-d675789e16ab // indirect
7+
github.com/go-redis/redis/v8 v8.11.5
8+
github.com/gofrs/uuid v4.2.0+incompatible
9+
github.com/golang/protobuf v1.5.2
10+
github.com/jmoiron/sqlx v1.3.4
11+
github.com/lib/pq v1.10.5
12+
github.com/spf13/cobra v1.4.0
13+
github.com/spf13/viper v1.10.1
14+
google.golang.org/protobuf v1.27.1
15+
)

go.sum

Lines changed: 851 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)