# The \`$rake db:\*\` commands and initializing a Discourse instance

**URL:** <https://meta.discourse.org/t/the-rake-db-commands-and-initializing-a-discourse-instance/198938>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [August 2, 2021, 7:44pm UTC](https://meta.discourse.org/t/the-rake-db-commands-and-initializing-a-discourse-instance/198938 "2021-08-02T19:44:15Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [August 2, 2021, 10:07pm UTC](https://meta.discourse.org/t/the-rake-db-commands-and-initializing-a-discourse-instance/198938/3 "2021-08-02T22:07:28Z")

</div>

Like Michael said, the database has to exist. I regularly do

```
   rake db:drop db:create db:migrate

```

to reset to a fresh database (when I’ve forgotten to save a backup of a fresh install!).

---

_[View the full topic](https://meta.discourse.org/t/the-rake-db-commands-and-initializing-a-discourse-instance/198938)._
