Migrating DNS records can be a tedious task, especially when you have a large number of domains. This script automates the process of preparing the DNS zone data at OpenProvider by extracting the records from Neostrada. This way, you only have to double-check the DNS zone before manually transferring the domains to OpenProvider.
Make sure you actively cancel the domains at Neostrada after the migration is completed to avoid double billing. Neostrastra currently does not automatically cancel the domains after transferring them to another provider.
Caution
This script is provided as-is and should be used with caution. Make sure to be mindful of the API access and the data you are working with. Always double-check the DNS zone data before transferring the domains to OpenProvider. It is your responsibility to ensure the data is correct and the migration is successful. I am not responsible for any data loss or incorrect DNS zones.
- Bulk export all active domains from Neostrada to a JSON file.
- Bulk export the DNS zone data and import it to OpenProvider.
- Copy the
.env.example
file to.env
. - API access to Neostrada (Bearer token obtained via your Neostrada account).
- Add the token as the
NEOSTRADA_API_KEY
in the.env
file.
- Add the token as the
- API access to OpenProvider
- Create a beared token by running
curl -X POST https://api.openprovider.eu/v1beta/auth/login -d '{"username": "YOUR-EMAIL", "password": "YOUR-PASSWORD", "ip": "x.x.x.x"}'
. where theip
is your current IP address. - Add the token as the
OPENPROVIDER_API_KEY
in the.env
file. - Make sure your account has access to the OpenProvider API. This can be activated via the OpenProvider dashboard, clicking on your name -> API -> click edit, scroll down and enable the API.
- Create a beared token by running
- Node.js >= 14
- Neostrada API access
- OpenProvider API access
Clone the repository and install dependencies:
git clone https://github.com/levdbas/neostrada-to-openprovider.git
cd neostrada-to-openprovider
npm install
-
Configure your credentials in the
.env
file:NEOSTRADA_API_KEY=your_neostrada_api_key OPENPROVIDER_API_KEY=your_openprovider_api_key
-
Run
node create-neostrada-domain.js
to create a json file with all active domains at Neostrada. -
Manually check the
neostrada-domains.json
file, pick a few domains and add them to the neostrada-domains.json file. -
Now run
node index.js
to loop through the domains in theneostrada-domains.json
file and start the migration process. -
Inside the
output
folder, you will find a json file for each domain with the DNS zone data. Use this data to manually check the imported DNS zone data at OpenProvider. -
Manually transfer the domains to OpenProviders. Since the DNS zone data is already prepared, you can just start the transfer process and you are good to go.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.