# Fehler bei der DB-Wiederherstellung in Dev

**URL:** <https://meta.discourse.org/t/errors-on-db-restore-in-dev/100647>\
**Category:** Development\
**Created:** [27. Oktober 2018 um 20:02 UTC](https://meta.discourse.org/t/errors-on-db-restore-in-dev/100647 "2018-10-27T20:02:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ryanerwin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryanerwin/32/94589_2.png) [@ryanerwin](https://meta.discourse.org/u/ryanerwin)\
**Post date:** [28. Oktober 2018 um 07:14 UTC](https://meta.discourse.org/t/errors-on-db-restore-in-dev/100647/3 "2018-10-28T07:14:40Z")

</div>

> [@michaeld](#):
>
> Did you rename the backup file?

Thanks for the suggestion.  
I didn’t rename the file, but to be certain I downloaded the backup again, repeat the restore process, and get the exact same errors as before, so it’s definitely not a file name issue.  
I was also able to restore the exact same file (matching md5sum) on a non-Arch image…

* * *

Checking inside `lib/backup_restore/restorer.rb` → `def get_dumped_by_version` I see:

```plaintext
        File.extname(@dump_filename) == '.gz' ? 'zgrep' : 'grep',

```

On Arch, we have:

```plaintext
zgrep --version
zgrep (gzip) 1.9

```

And on Ubuntu we have:

```plaintext
zgrep --version
zgrep (gzip) 1.6

```

It turns out there’s an update in zgrep 1.9…

```plaintext
zgrep -m1 mysite-net-2018-10-28-065449-v20180828065005.tar.gz -e '-- Dumped by pg_dump version
'
gzip: -e.gz: No such file or directory
gzip: -- Dumped by pg_dump version.gz: No such file or directory
 % echo $?
2

```

Vs zgrep 1.6:

```plaintext
zgrep -m1 mysite-net-2018-10-28-065449-v20180828065005.tar.gz -e '-- Dumped by pg_dump version'
ryan@rybuntuvm:~/discourse/public/backups/default$ echo $?
1

```

---

_[View the full topic](https://meta.discourse.org/t/errors-on-db-restore-in-dev/100647)._
