Click Export records. The portal downloads the records as a BIND zone file with the .zone extension, for example, sample-test.com.zone.
The exported file contains the zone origin, TTLs, SOA parameters, authoritative nameservers, and DNS records:
$ORIGIN test.dnsexample.com.
$TTL 300
@ IN SOA ns1.gcorelabs.net. support.gcore.com. (
1690969313 ; serial number
5400 ; refresh
3600 ; update retry
1209600 ; expiry
300 ; minimum
)
$TTL 3600
@ IN NS ns1.gcorelabs.net.
@ IN NS ns2.gcdn.services.
$TTL 600
@ IN A 1.2.3.4
@ IN A 4.5.6.7
* IN CNAME sample.domains.com.
* IN CNAME sample-2.domains.com.
Click Import records. Paste the BIND zone content into the dialog, or click Upload zone file to select a .zone file. Then click Import.
Import adds new RRsets to the zone. Existing RRsets with the same name and type are skipped; records not mentioned in the file remain unchanged.
Export and import DNS zone records as BIND-format zone files. Export returns the full zone file; import adds new RRsets to the zone. Existing RRsets with the same name and type are skipped — records not in the file remain unchanged.
The response contains the full zone as a BIND-formatted string in the raw_zone field. SOA and NS records are included automatically.
import os
from gcore import CDB
client = CDB()
exported = client.dns.zones.export(os.environ["ZONE_NAME"])
with open("zone-file.zone", "w") as f:
f.write(exported.raw_zone)
print("Saved to zone-file.zone")
print(exported.raw_zone)
{
"raw_zone": "$ORIGIN example.com.\n$TTL 300\n@ IN SOA ns1.gcorelabs.net. ...\n$TTL 3600\n@ IN NS ns1.gcorelabs.net.\n@ IN NS ns2.gcdn.services.\n$TTL 300\n@ IN A 1.2.3.4\nwww IN A 5.6.7.8\n"
}
Send the BIND zone file as a plain-text request body. Import adds new RRsets to the zone; existing RRsets with the same name and type are skipped and listed in warnings. Records not present in the file remain unchanged.