netbird/management/server/migration
Maycon Santos c3bc85e22d
Rename module to netbirdio/netbird (#288)
rename the go module to netbirdio/netbird 
as part of our rebranding.
2022-03-26 12:08:54 +01:00
..
convert_accounts_test.go Rename module to netbirdio/netbird (#288) 2022-03-26 12:08:54 +01:00
convert_accounts.go Rename module to netbirdio/netbird (#288) 2022-03-26 12:08:54 +01:00
README.md Refactor: support multiple users under the same account (#170) 2021-12-27 13:17:15 +01:00

Migration from Store v2 to Store v2

Previously Account.Id was an Auth0 user id. Conversion moves user id to Account.CreatedBy and generates a new Account.Id using xid. It also adds a User with id = old Account.Id with a role Admin.

To start a conversion simply run the command below providing your current Wiretrustee Management datadir (where store.json file is located) and a new data directory location (where a converted store.js will be stored):

    ./migration --oldDir /var/wiretrustee/datadir --newDir /var/wiretrustee/newdatadir/  

Afterwards you can run the Management service providing /var/wiretrustee/newdatadir/ as a datadir.