# Export JSON Collections?

**URL:** <https://discourse.getcockpit.com/t/export-json-collections/1193>\
**Category:** Uncategorized\
**Created:** [February 5, 2020, 2:00pm UTC](https://discourse.getcockpit.com/t/export-json-collections/1193 "2020-02-05T14:00:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StasSav](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/stassav/32/476_2.png) [@StasSav](https://discourse.getcockpit.com/u/StasSav)\
**Post date:** [February 5, 2020, 2:00pm UTC](https://discourse.getcockpit.com/t/export-json-collections/1193/1 "2020-02-05T14:00:53Z")

</div>

Hi,  
ich suche ein Plugin für Cockpit für alle Collections als Json Datei zu speichern?

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [February 6, 2020, 8:56am UTC](https://discourse.getcockpit.com/t/export-json-collections/1193/2 "2020-02-06T08:56:49Z")

</div>

For our English readers (my answer is in German):

> I search an addon to export all collections as json file.

Dafür ist kein Plugin nötig.

Klicke auf das Zahnrad und dann auf Exportieren:

 ![cp_export_01](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/1X/fa9186238dd1db5b50f819fdbbb40f40cea0d5b7.png)

Halte die Maus über den Collection-Namen und klicke auf Einträge exportieren.

 ![cp_export_02](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/1X/978dd42f12d1212b585172ffda8a116d809765bb.png)

Wenn du alle Collections auf einmal brauchst, kannst du dir das blitzschnell in PHP schreiben

```php
$pages = cockpit('collections')->find('pages');
$json = json_encode($pages);

```

---

<div class="post-metadata">

**Author:** ![artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/artur/32/4_2.png) [@artur](https://discourse.getcockpit.com/u/artur)\
**Post date:** [February 7, 2020, 11:07am UTC](https://discourse.getcockpit.com/t/export-json-collections/1193/3 "2020-02-07T11:07:43Z")

</div>

you can use the command line:

```auto
./cp export/collections --target {directorypath}

```

[https://getcockpit.com/documentation/reference/CLI](https://getcockpit.com/documentation/reference/CLI)
