# When to use "readonly mode during backup"

**URL:** <https://meta.discourse.org/t/when-to-use-readonly-mode-during-backup/136009>\
**Category:** Product Support\
**Tags:** read-only\
**Created:** [December 15, 2019, 5:07pm UTC](https://meta.discourse.org/t/when-to-use-readonly-mode-during-backup/136009 "2019-12-15T17:07:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [December 16, 2019, 1:59am UTC](https://meta.discourse.org/t/when-to-use-readonly-mode-during-backup/136009/5 "2019-12-16T01:59:56Z")

</div>

I’m quite sure we can remove the `readonly_mode_during_backup` setting. It’s off by default anyway. The chance of creating a backup in an inconsistent state is negligible compared to the annoyance of showing a read-only banner to all users everytime a backup is created.  
pg\_dump runs in a serializable transaction, so an inconsistent state can only happen when Discourse is in the middle of persisting data into multiple tables without using a transaction exactly at the beginning of the database dump. That should be quite rare.

Enabling that setting enables read-only mode only for the duration of database backup. Not a second longer, so it’s not really usable for migrating to another host. You’d be better of in using the “Enable read-only” button in `/admin/backups`.

---

_[View the full topic](https://meta.discourse.org/t/when-to-use-readonly-mode-during-backup/136009)._
