Viele unserer interforum-Links sind nach dem Umzug auf einen neuen Server defekt. Ich hatte den neuen Server unter einer temporären URL (staging.example.com) eingerichtet, um den Übergang zu erleichtern. Da der Übergang nun abgeschlossen ist, zeigen viele Links auf forum.example.com immer noch auf staging.example.com (das nicht mehr existiert).
Ich habe im Bereich Admin > Einstellungen nach verbliebenen Spuren von „staging" gesucht.
Die DNS-Einträge sind längst propagiert.
Ich habe diesen alten Hinweis gefunden, bin mir aber nicht sicher, ob er relevant ist.
Wenn keine andere Lösung möglich ist als eine manuelle Bearbeitung, gibt es dann Tipps, wie man alle Vorkommen findet? Die Suchfunktion funktioniert dafür nicht gut.
> /var/www/discourse# discourse remap staging.example.com forum.example.com
> Rewriting all occurences of staging.example.com to forum.example.com
> THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES)
> YES
> Error: ERROR: duplicate key value violates unique constraint "unique_post_links"
> DETAIL: Key (topic_id, post_id, url)=(8718, 57455, https://forum.example.com/t/exampletopic/4606/336) already exists.
> The remap has only been partially applied due to the error above. Please re-run the script again.
I re-ran it as instructed and got the same error, on the same (topic_id, post_id, url) key.
I can get to the rails console and run some SQL/ActiveRecord if you can tell me what to run. Or Data Explorer.
I cleaned up a few posts and was able to complete the remap. However the rebake ran to 30% then encountered errors and hung the system and I had to reboot. System has adequate memory and disk space.
Question: After reboot, in ‘top’, there is a ruby process using 60% CPU. Is that the rake job? Would it resume after reboot?