*"If you're starting with scotchbox from Vagrant, it will only be downloaded to your Vagrant cache once and then Vagrant will just use that base image to provision your project VMs so you won't be wasting any disk space keeping older projects around." *Thanks! This is was what I was really looking for. I didn't know if keeping older projects without destroying the virtual machine was wasting any disk space. So thanks again, I'll do as you said ;)
El lunes, 17 de septiembre de 2018, 21:14:42 (UTC+2), Jp Toto escribió: > > Nicolas, > > What you could do (and probably should do) is use a different base folder > for each project and in each one would contain a different Vagrantfile > file. Then for each project you can tweak your Vagrant file for > provisioning <https://www.vagrantup.com/docs/provisioning/> specific to > your project. To bring up that project, you'd "vagrant up" inside that root > folder where the Vagrantfile is. To turn it off you'd "vagrant halt" from > the same place. > > When you "vagrant halt" from the root project folder containing the > Vagrantfile, it will shut down the virtual machine in whatever hypervisor > you're using (let's assume VirtualBox). Once a machine is halted, it's not > using any resources except some disk space to store the VM file, the > location of which is governed by VirtualBox. > > With that workflow there is no need to destroy any of your Vagrant boxes > or old projects. Since you're setting some domain/IP config locally you may > need to tweak that depending on which project you're working on but even > that can be mitigated. Assign a different static private IP > <https://www.vagrantup.com/docs/networking/private_network.html> to each > project VM within the Vagrantfile and then you can rely on that for network > hostnames in your /etc/hosts file (or however you're doing that). > > If you're starting with scotchbox from Vagrant, it will only be downloaded > to your Vagrant cache once and then Vagrant will just use that base image > to provision your project VMs so you won't be wasting any disk space > keeping older projects around. > > Hope that helps. Good luck! > > On Mon, Sep 17, 2018 at 1:32 PM Nicolas Blanco Mattos < > [email protected] <javascript:>> wrote: > >> Hi everyone! >> >> I have some newbie questions in the best way of using several vagrant >> boxes, destroying them, and then spinning them up again. >> >> I am a web developer and I use scotchbox for my local enviroment. I >> create a new box downloading scotchbox and creating a new local domain for >> the IP the project uses, BUT when I'm done with the project: what is the >> best way to free resources without loosing data and not keeping garbage >> that I won't use anymore? >> >> Is it ok to make a copy of the database, destroy the box, move the >> project files and database to a dropbox folder for storage (for example), >> and if some day I need to work on this project again just do a 'vagrant >> up', reimport the database, and copy files back again? >> >> Another way would be to move the entire project folder (with the >> .vagrant) to the dropbox folder for storage without destroying anytihing >> and when needed again just copy it back... but I assume that I am not >> releasing the resources that the vritual machine is using, as I am not >> destroying it and also some kind of problems could be caused... Am I right? >> What are your workflows in this topic? >> >> Thanks!! >> >> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/mitchellh/vagrant/issues >> IRC: #vagrant on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Vagrant" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/vagrant-up/8a15276a-be46-4d4e-921c-bb050ccf9a3c%40googlegroups.com >> >> <https://groups.google.com/d/msgid/vagrant-up/8a15276a-be46-4d4e-921c-bb050ccf9a3c%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > JP Toto | [email protected] <javascript:> | http://jptoto.jp > | @jptoto <http://twitter.com/jptoto> > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/4367f549-ccbc-4915-9455-04ddee0fc709%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
