Documentation - Importing and Exporting
Refract DNS provides multiple ways to import data and also the ability to export data to other Refract DNS instances.
Data can be imported from your Windows Hosts file and imported/exported Refract DNS to be shared with other Refract DNS users.
Hosts File Import
The Host File Importer allows the user to import entries already configured in their Windows Hosts file.
The Host File Importer can be accessed from the Control Panel. When the importer screen loads it will automatically read the machines hosts file. The importer will only list entries that are not already configured in Refract DNS.
When the host file is read the tool will identify the following:
- The type of record, either A or AAAA.
- The state of the entry, enabled or disabled
- The domain
- The IP address
The tool will read entries where multiple domains appear on the same line after an IP address. For example the list of entries in the image above were generated from the following hosts file:
# 18.104.22.168 rhino.acme.com # source server # 22.214.171.124 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 www.refractdns.local 2a00:1450:4009:808::200e staging.refractdns.com 126.96.36.199 www.refractdns.com sub.refractdns.com #188.8.131.52 www.refractdns.com #184.108.40.206 www.refractdns.com
After reading the file the the user can choose which entries to import, which entries should be enabled and also add a description for each record.
After importing the hosts file Refract DNS will comment out and mark imported entries. Imported entries will be prefixed with '#RDNS'. In the following example the first entry was imported but the second entry wasn't:
220.127.116.11 sub.refractdns.com 18.104.22.168 www.refractdns.com
#RDNS 22.214.171.124 sub.refractdns.com 126.96.36.199 www.refractdns.com
Where two domains appear on the same line but only one domain was imported Refract DNS will create a new line for the domain that wasn't imported. Refract DNS will also add a comment to indicate that the line was added. In the following example both www.refractdns.com and sub.refractdns.com appeared on the same line but only www.refractdns.com was imported:
188.8.131.52 www.refractdns.com sub.refractdns.com
#RDNS 184.108.40.206 www.refractdns.com sub.refractdns.com 220.127.116.11 sub.refractdns.com #RDNS Added
Refract DNS allows you to import data from another Refract DNS instance. This allows you to quickly load configuration from colleagues and fellow Refract DNS users.
Clicking the Select File button will allow you to select a file for importing. The file to import must have come from another Refract DNS instance.
Refract DNS will load the records, groups and domains in the file and display them in the import screen. From this screen you can select which data you wish to import.
When importing data Refract DNS will merge the imported data with the data your already have in your system.
- If a matching domain already exists then imported records will be written beneath the existing domain.
- If a matching group already exists then imported group records will be added to the existing group.
- If a matching record already exists then the imported record will be ignored.
All imported records and groups will be disabled by default.
Refract DNS allows you to export data from another Refract DNS instance. This allows you to share configuration with colleagues and fellow Refract DNS users.
The export screen allows you to pick domains and records for exporting. There are various was to select the data that you wish to export:
- Selecting a record will select just the record for export. When you export the data Refract DNS will automatically add the domain to the exported data so that it can be imported by another system.
- Selecting a domain will select the domain and all child records.
- Selecting a group will select the group and all records associated to the group.
After you have selected the data you wish to export, click the Export button to save the data to file. You will be prompted to enter the name and location of where you want to save the file.