# Admin export HTTP response

**URL:** <https://discuss.dgraph.io/t/admin-export-http-response/4557>\
**Category:** Dgraph\
**Created:** [May 31, 2019, 7:33pm UTC](https://discuss.dgraph.io/t/admin-export-http-response/4557 "2019-05-31T19:33:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KevOrr](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/kevorr/32/1786_2.png) [@KevOrr](https://discuss.dgraph.io/u/KevOrr)\
**Post date:** [May 31, 2019, 7:33pm UTC](https://discuss.dgraph.io/t/admin-export-http-response/4557/1 "2019-05-31T19:33:49Z")

</div>

Currently, by accessing `http://<host>:<port>/admin/export`, the HTTP response doesn’t indicate the name or path to the export. Reading through `dgraph/cmd/alpha/admin.go` and `worker/export.go`, it doesn’t seem to return the name to the user anywhere. What’s the best way to figure out the name of the export?

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [May 31, 2019, 8:35pm UTC](https://discuss.dgraph.io/t/admin-export-http-response/4557/2 "2019-05-31T20:35:53Z")

</div>

By default exports are written to the `export` directory where the Dgraph Alpha runs. This is configurable by the Dgraph Alpha flag `--export`).

---

<div class="post-metadata">

**Author:** ![KevOrr](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/kevorr/32/1786_2.png) [@KevOrr](https://discuss.dgraph.io/u/KevOrr)\
**Post date:** [May 31, 2019, 8:38pm UTC](https://discuss.dgraph.io/t/admin-export-http-response/4557/3 "2019-05-31T20:38:04Z")

</div>

Thanks for the reply @dmai. I’m wondering about the name of each specific import. I.e., the name of the export under the `export` directory.

---

<div class="post-metadata">

**Author:** ![dmai](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dmai/32/1254_2.png) [@dmai](https://discuss.dgraph.io/u/dmai)\
**Post date:** [May 31, 2019, 8:50pm UTC](https://discuss.dgraph.io/t/admin-export-http-response/4557/4 "2019-05-31T20:50:59Z")

</div>

> [@KevOrr](#):
>
> What’s the best way to figure out the name of the export?

The Alpha log will show the exported file paths:

```plaintext
I0531 20:40:41.367570 1 export.go:262] Exporting data for group: 1 at /dgraph/export/dgraph.r1.u0531.2040/g01.rdf.gz
I0531 20:40:41.367685 1 export.go:273] Exporting schema for group: 1 at /dgraph/export/dgraph.r1.u0531.2040/g01.schema.gz

```

And here’s the `tree` output for the export directory from this example:

```plaintext
$ tree ./export
./export
`-- dgraph.r1.u0531.2040
    |-- g01.rdf.gz
    `-- g01.schema.gz

```

The files themselves are named `g01.rdf.gz` and `g01.schema.gz` for the data and schema files. “g01” means this export data is from Alpha Group 1. If there are multiple Alpha groups, then each group creates their own export for g02, g03, etc.

The directory “dgraph.r1.u0531.2040” is the name of the directory. “r1” is the read timestamp at the time of the export (1, in this case). “u0531.2040” is the UTC timestamp of the export in the format MMDD.HHMM. Each export will be in its own directory following this naming structure. e.g., in the following example the second export for group 1 had a read timestamp of 202 and happened at 05/31, 20:45 UTC.

```plaintext
$ tree ./export
./export
|-- dgraph.r1.u0531.2040
| |-- g01.rdf.gz
| `-- g01.schema.gz
`-- dgraph.r202.u0531.2045
    |-- g01.rdf.gz
    `-- g01.schema.gz

```

---

<div class="post-metadata">

**Author:** ![KevOrr](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/kevorr/32/1786_2.png) [@KevOrr](https://discuss.dgraph.io/u/KevOrr)\
**Post date:** [June 1, 2019, 3:17pm UTC](https://discuss.dgraph.io/t/admin-export-http-response/4557/5 "2019-06-01T15:17:33Z")

</div>

Ok. I was thinking it would be nice if the name of the export was returned in the HTTP API response, but knowing that I can find the most recent export based on the timestamp format is enough. Thanks
