A user, Rasin, is experiencing issues restoring a Discourse backup on a new server, encountering a PG::UniqueViolation error related to a duplicate slug in the categories table. The error occurs during the restore process, and despite not modifying the backup file, the issue persists. Another user, ariznaf, notes that similar problems have been resolved by retrying the restore multiple times, suggesting a potential bug in the restore scripts or PostgreSQL behavior. Rasin also reports a subsequent Compression::Strategy::ExtractFailed error, indicating possible corruption or incompatibility with the archive. The discussion references a GitHub commit (c71da3f3352159f02276c9a49f1ed8c54c75010d) that addresses the unique index issue, and developer Daniel confirms the fix is now available. Rasin seeks guidance on manually resolving the SQL error, while others suggest retrying or waiting for updates. Rasinariznafgerharddaniel
PG::UniqueViolation: ERROR: could not create unique index "unique_index_categories_on_slug"
DETAIL: Key (COALESCE(parent_category_id, '-1'::integer), slug)=(5, ) is duplicated.
I though it could be a DB problem, but I didn’t edit it. Just download the backup tar but restored wrongly.