Hi,
Is there some kind of trick to restoring Discourse if you can’t access the interface to make a backup?
A machine is in a bad way, but I was able to get /var/discourse entirely.
I tested installing Postgres on a local machine and changing the data directory and can see the database is there.
If I copy everything over and run ./launcher rebuild app, I see the next user wizard when I log in to Discourse. During the rebuild, I also get:
I, [2018-06-15T18:21:18.896019 #14] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
2018-06-15 18:21:22.501 UTC [416] discourse@discourse ERROR: relation "users" does not exist at character 566
2018-06-15 18:21:22.501 UTC [416] discourse@discourse STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"users"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
2018-06-15 18:21:22.952 UTC [416] discourse@discourse ERROR: relation "user_actions" does not exist at character 566
2018-06-15 18:21:22.952 UTC [416] discourse@discourse STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"user_actions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Is there something I need to set to stop Discourse from creating a new database each time?
I believe a ./launcher rebuild app was running when the other node experienced a problem. I hope that the database is not in a partial state.
Thanks in advance
Sam