# Reset after running migration script?

**URL:** <https://meta.discourse.org/t/reset-after-running-migration-script/281224>\
**Category:** Migration\
**Tags:** vanilla\
**Created:** [October 5, 2023, 10:29pm UTC](https://meta.discourse.org/t/reset-after-running-migration-script/281224 "2023-10-05T22:29:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![MikeD](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@MikeD](https://meta.discourse.org/u/MikeD)\
**Post date:** [October 8, 2023, 10:57pm UTC](https://meta.discourse.org/t/reset-after-running-migration-script/281224/4 "2023-10-08T22:57:51Z")

</div>

> [@pfaffman](#):
>
> It works that way on purpose. The idea is that your can do an import now and then run another with a fresh dump they will run very fast since it imports only the new data.

That makes perfect sense, thank you for explaining. It would be nice if there was a flag one could set to “force overwrite” but I dug thorough the code a bit and didn’t see anything obvious.

> [@pfaffman](#):
>
> You need to drop, create, and migrate the database to start over

Is there an easy way to do that? The only solution I’ve found are these commands, which basically are the same as starting a fresh docker install:

```plaintext
# WARNING: these commands delete your entire Discourse forum
cd /var/discourse
sudo ./launcher stop app
sudo rm -rf /var/discourse/shared/standalone
sudo ./launcher rebuild app

```

It only takes about 10 minutes, but then I have to go through the initial setup again, which is a pain.

> [@pfaffman](#):
>
> If you have lots of users, you could stop the script after the users were imported and make a backup then and restore that backup before you try your fixes.

Now that is a fantasic idea! I could even just make a backup after a fresh install, but before running the import script at all, since re-importing users/topics/posts/comments is pretty quick, and this forum is not live to the public.

---

_[View the full topic](https://meta.discourse.org/t/reset-after-running-migration-script/281224)._
