Pages

Tuesday, March 10, 2015

How to scp Vagrant?

from VM to local:

vagrant scp (name of the Vagrant environment:Vagrant path in the box) (local folder path - from the directory from which Vagrant is loaded)

vagrant scp default:/home/vagrant/jayani jayani

from local to VM:
vagrant scp  (local folder path - from the directory from which Vagrant is loaded) (name of the Vagrant environment:Vagrant path in the box)

vagrant scp jayani /home/vagrant

if you have multiple Vagrant environment precede with the name of the Vagrant environment.
vagrant scp master:jayani /home/vagrant

How to find the name of the Vagrant environment?

execute the following command:
vagrant global-status

id       name    provider   state   directory                                   
---------------------------------------------------------------------------------
894ce03  default virtualbox running /Users/jwithanawasam/
cbb0745  master  virtualbox running /Users/jwithanawasam/
c296e12  slave01 virtualbox running /Users/jwithanawasam/
3c6e261  slave02 virtualbox running /Users/jwithanawasam/

No comments:

Post a Comment