# Backup restoration fails

**URL:** https://meta.discourse.org/t/backup-restoration-fails/405387
**Category:** Self-hosting
**Tags:** backups
**Created:** [June 16, 2026, 8:15am UTC](https://meta.discourse.org/t/backup-restoration-fails/405387 "2026-06-16T08:15:13Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Michael\_Furtenbach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael_furtenbach/32/134687_2.png) [@Michael\_Furtenbach](https://meta.discourse.org/u/Michael_Furtenbach)
#### Post date: [June 16, 2026, 8:15am UTC](https://meta.discourse.org/t/backup-restoration-fails/405387/1 "2026-06-16T08:15:13Z")

</div>

I’m having the following problem. I’ve been running a Discourse forum for over 10 years, and since I haven’t been able to install updates for some time now, I wanted to set up a new server:

Old server is running: 3.4.0.beta4-dev

New server: Latest version

The backup is already 673.2 MB in size as a .gz file, excluding uploads

Unfortunately, the restoration keeps aborting. The log file contains this error

```plaintext
[2026-06-16 07:54:52] ERROR: could not create unique index “index_incoming_referers_on_path_and_incoming_domain_id”
[2026-06-16 07:54:52] DETAIL: Key (path, incoming_domain_id)=(//, 5) is duplicated.
[2026-06-16 07:54:52] EXCEPTION: psql failed: DETAIL: Key (path, incoming_domain_id)=(//, 5) is duplicated.

[2026-06-16 07:54:52] /var/www/discourse/lib/backup_restore/database_restorer.rb:93:in 'BackupRestore::DatabaseRestorer#restore_dump'
/var/www/discourse/lib/backup_restore/database_restorer.rb:26:in ‘BackupRestore::DatabaseRestorer#restore’
/var/www/discourse/lib/backup_restore/restorer.rb:61:in 'BackupRestore::Restorer#run'
/var/www/discourse/script/spawn_backup_restore.rb:20:in ‘Object#restore’
/var/www/discourse/script/spawn_backup_restore.rb:33:in ‘block in ’
/var/www/discourse/script/spawn_backup_restore.rb:4:in 'Kernel#fork'
/var/www/discourse/script/spawn_backup_restore.rb:4:in ‘’
[2026-06-16 07:54:52] Trying to rollback...

```

What can I do to fix this problem and not lose the last 10 years of data?

Thank you in advance for any help!

---

_[View the full topic](https://meta.discourse.org/t/backup-restoration-fails/405387)._
