Back to Supabase

Failed To Restore From Backup All Subscriptions And Replication Slots Must Be Dropped Before A Backup Can Be Restored L RCvt

apps/docs/content/troubleshooting/failed-to-restore-from-backup-all-subscriptions-and-replication-slots-must-be-dropped-before-a-backup-can-be-restored-L-rCvt.mdx

1.26.04431 B
Original Source

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

You can check those with:

SELECT * FROM pg_replication_slots;

SELECT * FROM pg_subscription;

You can drop them with:

DROP SUBSCRIPTION <subscription>;

SELECT pg_drop_replication_slot(slot_name);

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