New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import multiple zones simultaneously. #96

Closed
framirezu opened this Issue May 17, 2014 · 8 comments

Comments

Projects
None yet
2 participants
@framirezu

framirezu commented May 17, 2014

Hello.

I manage several servers with DNS zones created around 2000, and I would like to migrate this information into fmdns.
I have been researching and using "rndc dumpdb" and some "bash script" I can create "inserts" into the database.
But before I try to develop this, Do you have any script or tool for this case?. Could you help me telling me which tables are would have to insert?. I've found 3 so far. (fm_dns_domains, fm_dns_records, fm_dns_soa)

Thank you for your attention and for your great work.

PD. sorry for my poor english.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented May 17, 2014

Hi,

Those three are the only tables you'd need to insert data into. However, there is an import tool (Admin->Tools) that will import zone data. Is that tool not sufficient for your needs?

@framirezu

This comment has been minimized.

framirezu commented May 17, 2014

Hi

Import tool (Admin-> Tools), is a good option, but only allows me to import the records of a zone for each upload. ie, to import a single zone I need to do the following steps:

  1. Create the area. (Zones> add)
  2. Create SOA record (with the same data in 99% of cases).
  3. Import Records. (Admin-> tools, select the file and select the respective area.).

And these steps for each zone requires a little work.

I will try to develop a small php script to import all the zones and records directly from a "#rndc dumpdb -zones". This could significantly reduce migration time.

Thanks for the info tables.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented May 17, 2014

You can actually skip your step 2 of creating the SOA as the import tool imports SOA records. However, it's still a two-step process per zone, so spending the time to create your own import tool might prove to be faster (depending on how many zones you have).

I might look into creating/implementing a migration tool as well, unless you'd like to contribute to the project by providing your completed one.

@framirezu

This comment has been minimized.

framirezu commented May 20, 2014

Hello.

me again =). Here I leave a php script that imports all areas to the fmdns bind from a dump file. "#rndc dumpdb -zones".
https://dl.dropboxusercontent.com/u/54936168/bind2fmdns.rar

In addition:
With 700 zones and 6500 records the system becomes very slow.
to solve this you need to add an index in the database.
">ALTER TABLE ADD INDEX fm_dns_records idx_domain_id (domain_id);"

Tuning required to perform database.

Thanks you for you time.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented May 20, 2014

This is fantastic! Thank you for the help and letting me know the results of a large scale deployment of fmDNS.

I've added the index for the next release and will take a look at your import script.

WillyXJ pushed a commit that referenced this issue May 20, 2014

@framirezu

This comment has been minimized.

framirezu commented May 20, 2014

the function "buildconf" also is very slow. I guess also need to create indexes on several other tables. I will be posting any updates.

WillyXJ pushed a commit that referenced this issue May 30, 2014

@WillyXJ WillyXJ added this to the 2.0 release milestone Aug 22, 2014

@WillyXJ WillyXJ modified the milestones: 2.x release, 3.0 release Dec 2, 2015

WillyXJ added a commit that referenced this issue Aug 30, 2016

fmDNS - #96 - Import zone dump file support
Code based on bind2fmdns provided by @framirezu
@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Sep 8, 2016

The zone import wizard now includes this in 3.0-alpha1 and later.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Jun 23, 2017

This is now included in 3.0 and later.

@WillyXJ WillyXJ closed this Jun 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment