"The restore failed. Please check the logs."


i had was to rm -rf the discourse folder due to rebuilding failing,
downloaded a fresh copy, installed, uploaded backup and it keeps failing saying i should check logs.
full log is too long to post here so i posted it on pastebin

(Régis Hanol) #2
EXCEPTION: PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_screened_ip_addresses_on_ip_address"
DETAIL:  Key (ip_address)=( already exists.

This is weird, looks like your backup has some inconsistent data :frowning:

Your best luck is to extract the .sql file from the backup, comment the following line

INSERT INTO "screened_ip_addresses" ("id", "ip_address", "action_type", "created_at", "updated_at") VALUES (1, '', 2, '2017-08-09 14:07:59.181953', '2017-08-09 14:07:59.181953') RETURNING "id"

and recreate the backup archive with your fixed .sql file and try to restore it.

Error (could not create unique index "badges_pkey") attempting to restore backup

ok, this is a bit confusing lol, where do i comment the line

(Jay Pfaffman) #4

You’d un-tar the backup file, the edit the sql file inside it, comment out that line, and re-tar the file.


i dont see that line in the sql db

(Jay Pfaffman) #6

Hey, @zogstrip. Could this be a bug? That address seems like it’d not be user supplied.


could i send you sql db dump since you’re experienced with it and you have a look? though i hate the idea of doing it but, seems like my only hope, i just really need it to restore cause after doing so much with it and signups and all, just a bummer to ask everyone to sign back up lol :frowning:

(Jeff Atwood) #8

If you’d like paid help, check with https://www.literatecomputing.com/


i had already spoke with him, i havent any money to do that, i thought here would help as it is a software problem, cause i didnt mess with files or anything, just downloaded backup, i tried to follow a tutorial here One admin can't revoke admin role from another user. Who is adminest of them all?
and it caused boot strap to failed after rebuild so i just deleted everything and tried to restore backup and it failed

(Mittineague) #10

You’ve moved to a real VM?


that was me helping out a friend, this problem im having is with my site which everything works.