<p>Nope, the <a href="https://github.com/craftcms/cms/blob/develop/src/controllers/UtilitiesController.php#L333" rel="nofollow noreferrer">UtilitiesController</a> is hard-coded to use <code>.zip</code>:</p>

<pre class="lang-php prettyprint-override"><code>        $zip = new ZipArchive();

        if ($zip-&gt;open($zipPath, ZipArchive::CREATE) !== true) {
            throw new Exception('Cannot create zip at ' . $zipPath);
        }

        $filename = pathinfo($backupPath, PATHINFO_BASENAME);
        $zip-&gt;addFile($backupPath, $filename);
        $zip-&gt;close();

        return Craft::$app-&gt;getResponse()-&gt;sendFile($zipPath, null, [
            'mimeType' =&gt; 'application/zip',
        ]);

</code></pre>

CC BY-SA 4.0
2020-05-31T06:05:54.920Z
Thanks for a prompt answer! I am using Sequel Pro for the local development and it does not allow the import of `zip` files but works fine with `gzip`. I assume it is a common practice to import gzipped databases. Is there a way to import zipped databases?
Alex Ljamin
CC BY-SA 4.0
2020-05-31T20:05:10.177Z
@alljamin: Just unzip the file before loading into Sequel Pro. Unlike PHP-based web tools eg phpmyadmin, larger file sizes won't choke on import if that's what you're worried about.
RitterKnight
CC BY-SA 4.0
2020-06-03T09:30:56.100Z
@RitterKnight my concern with `zip` format is an inconvenience of having to unzip in order to import, wherewith `gzip` I can import without unzipping.
Alex Ljamin
CC BY-SA 4.0
2020-06-03T20:04:51.243Z
You should file a [feature request](https://github.com/craftcms/cms/issues) for gzip.
RitterKnight
CC BY-SA 4.0
2020-05-30T23:47:10.087Z
2020-05-30T23:47:10.087Z
andrew.welch
<p>With using the CraftCMS builtin database export feature, is it possible to specify the export config to have the file in <code>.gzip</code> instead of just <code>.zip</code>? If, yes, then how can I do it?</p>

<p><a href="https://i.sstatic.net/IORMW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IORMW.png" alt="backup"></a></p>

<mysql><back-up><export><zip>
Download database in gzip
# Download database in gzip

(Asked by: username_0 on 2020-05-30)

With using the CraftCMS builtin database export feature, is it possible to specify the export config to have the file in `.gzip` instead of just `.zip`? If, yes, then how can I do it?

[![backup](https://i.sstatic.net/IORMW.png)](https://i.sstatic.net/IORMW.png)

**Tags:** mysql, back-up, export, zip

---

## 1 answers

### Answer by username_1 on 2020-05-30. Score: 1 | Accepted answer

Nope, the UtilitiesController is hard-coded to use .zip:
        $zip = new ZipArchive();

        if ($zip->open($zipPath, ZipArchive::CREATE) !== true) {
            throw new Exception('Cannot create zip at ' . $zipPath);
        }

        $filename = pathinfo($backupPath, PATHINFO_BASENAME);
        $zip->addFile($backupPath, $filename);
        $zip->close();

        return Craft::$app->getResponse()->sendFile($zipPath, null, [
            'mimeType' => 'application/zip',
        ]);

> **Comments:**
> **username_0**: Thanks for a prompt answer! I am using Sequel Pro for the local development and it does not allow the import of `zip` files but works fine with `gzip`. I assume it is a common practice to import gzipped databases. Is there a way to import zipped databases?  
> **username_2**: @alljamin: Just unzip the file before loading into Sequel Pro. Unlike PHP-based web tools eg phpmyadmin, larger file sizes won't choke on import if that's what you're worried about.  
> **username_0**: @RitterKnight my concern with `zip` format is an inconvenience of having to unzip in order to import, wherewith `gzip` I can import without unzipping.  
> **username_2**: You should file a [feature request](https://github.com/craftcms/cms/issues) for gzip.  

---

