# Error when restore DB backup

**URL:** <https://meta.discourse.org/t/error-when-restore-db-backup/93145>\
**Category:** Self-hosting\
**Created:** [July 25, 2018, 11:15pm UTC](https://meta.discourse.org/t/error-when-restore-db-backup/93145 "2018-07-25T23:15:05Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![UnivacTwo](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@UnivacTwo](https://meta.discourse.org/u/UnivacTwo)\
**Post date:** [July 26, 2018, 7:41pm UTC](https://meta.discourse.org/t/error-when-restore-db-backup/93145/21 "2018-07-26T19:41:41Z")

</div>

Actually I have the same issue. I have created a backup and then reinstalled Discourse with the same Ansible script, and now I cannot import the backup.

It looks like I’ve been able to upload an older backup, but not the last one.

There may be a problem with the last Discourse version not creating a good backup file.

> [2018-07-26 19:26:32] Cannot restore into different schema, restoring in-place  
> [2018-07-26 19:26:32] Enabling readonly mode…  
> [2018-07-26 19:26:32] Pausing sidekiq…  
> [2018-07-26 19:26:32] Waiting for sidekiq to finish running jobs…  
> [2018-07-26 19:26:32] Restoring dump file… (can be quite long)  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] set\_config  
> [2018-07-26 19:26:32] ------------  
> [2018-07-26 19:26:32] (1 row)  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] SET  
> [2018-07-26 19:26:32] ERROR: function “raise\_email\_logs\_reply\_key\_readonly” already exists with same argument types  
> [2018-07-26 19:26:32] ERROR: current transaction is aborted, commands ignored until end of transaction block  
> [2018-07-26 19:26:32] ERROR: current transaction is aborted, commands ignored until end of transaction block  
> [2018-07-26 19:26:32] ERROR: current transaction is aborted, commands ignored until end of transaction block

[Discourse Restore Backup error log.txt](https://global.discourse-cdn.com/meta/original/3X/f/b/fb33e2663c9a60febf80e57ec2340e5e7cb41616.txt) (344.9 KB)

here is the backup archive [Dropbox](https://www.dropbox.com/s/87zzy8ct3t6qm68/production-2018-07-26-174434-v20180724070554.tar.gz?dl=0)

---

_[View the full topic](https://meta.discourse.org/t/error-when-restore-db-backup/93145)._
