Skip to content

Failed to restore from backup: All subscriptions and replication slots must be dropped before a backup can be restored.

正如错误所提示的,你必须先取消所有当前的订阅或复制槽才能恢复备份。

🌐 As the error suggests, you must first drop any current subscriptions or replication slots to restore backups.

你可以用这个来检查那些:

🌐 You can check those with:

1
SELECT * FROM pg_replication_slots;
2
3
SELECT * FROM pg_subscription;

你可以用以下方式击倒他们:

🌐 You can drop them with:

1
DROP SUBSCRIPTION <subscription>;
2
3
SELECT pg_drop_replication_slot(slot_name);

注意:这些操作是破坏性的。没关系,因为你会用备份覆盖你的数据库。

🌐 NOTE: These are destructive actions. This is fine since you will overwrite your database with a backup.