When using homestead for laravel projects it keeps deleting any databases that are created on the box. Is is possible to retain databases when halting / destroying the homestead box so that they still appear once homestead up or provision is run
Asked
Active
Viewed 159 times
1 Answers
1
You should suspend the box if you want to keep the databases: vagrant suspend
. Then when you are ready to use it again you can use vagrant up
If you destroy the box, then re-create it - all the databases will be gone.

Laurence
- 58,936
- 21
- 171
- 212
-
What if i shut down my machine? Provision will destroy the databases wont it? – Pierce McGeough Apr 08 '15 at 22:50
-
No - because you only `provision` the box once. You then `suspend` the box every time after that. When suspended, the computer is safe to turn off/on. You shouldnt be provisioning the box daily - just once every now and again. I havent provisioned my box for 6 months. – Laurence Apr 08 '15 at 23:06
-
But if i need to add a new project, map a new files etc. Is it not provision i use then? I have been following a few seperate tutorials so i am adding new sites a few times a month between new ones and starting from scratch – Pierce McGeough Apr 08 '15 at 23:11