Error restoring backup "key is duplicated"

discourse=> \d topic_users_id_seq
     Sequence "public.topic_users_id_seq"
    Column     |  Type   |        Value        
---------------+---------+---------------------
 sequence_name | name    | topic_users_id_seq
 last_value    | bigint  | 2481334
 start_value   | bigint  | 1
 increment_by  | bigint  | 1
 max_value     | bigint  | 9223372036854775807
 min_value     | bigint  | 1
 cache_value   | bigint  | 1
 log_cnt       | bigint  | 0
 is_cycled     | boolean | f
 is_called     | boolean | f
Owned by: public.topic_users.id

discourse=> select count(id),max(id) from topic_users;
  count  |   max   
---------+---------
 2467987 | 2481334
(1 row)