Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of RoundhousE's RestoreRun mode?

According to the documentation, RoundhousE has 3 modes:

  • Normal
  • DropCreate
  • RestoreRun

The first 2 are clear, but I don't understand RestoreRun Mode and the benefit it offers in Production:

Once you have gone to production, you switch from DropCreate to RestoreRun mode if your database is small enough. If not, you can continue with the idea of maintenance mode by switching to a new script name that you are making changes to. You can also backup the structure only (and some of the lookup data if you use a tool like LiteSpeed) and restore from that.

I was under the impression that RestoreRun would restore a backup of the database before running the migrations scripts. If this is the case, I could see it being useful in development where I am repeatedly testing my new scripts, but don't see the purpose of it for production.

Here are my questions:

  1. Am I misunderstanding the purpose of RestoreRun?
  2. What is an example scenario of how RestoreRun would benefit a production deployment?
  3. Are there any other differences other than starting with a db restore between RestoreRun and Normal mode?

Any insight into this would be much appreciated.

like image 770
Joel Beckham Avatar asked Oct 10 '22 15:10

Joel Beckham


1 Answers

You misunderstood the documentation. It doesn't say to use RestoreRun on production. It says that you should use it during development when your db is already in production.

like image 175
Piotr Perak Avatar answered Oct 14 '22 04:10

Piotr Perak