---
title: "ezgh dns zones export"
description: "Print a zone's records as a zone file."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh dns zones export

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh dns zones export <zone>
```

Print a zone's records as a complete BIND zone file: $ORIGIN, the zone's SOA and own NS, then every record by its absolute name. `ezgh dns records import` reads it back, leaving out the SOA and NS, which are managed for you. With -o json or yaml, it's the zone file in a field.

Part of [`ezgh dns zones`](/cli/reference/dns-zones).

## Flags

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/dns-zones-export/index.mdx
