Copying files.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 30 May 2019 01:20:55 +0300
changeset 2372 a6ba7fce5ed9
parent 2371 026d8d922e7c
child 2373 07d81edeaba6
Copying files.
vagrant.rst
--- a/vagrant.rst	Thu May 30 01:20:42 2019 +0300
+++ b/vagrant.rst	Thu May 30 01:20:55 2019 +0300
@@ -208,6 +208,33 @@
   vagrant provision --provision-with root_ssh
   vagrant provision --provision-with user_ssh,root_ssh
 
+Copying files
+=============
+
+To copy files recursively to running box::
+
+  vagrant upload $SRC $DST
+  vagrant upload $SRC $DST  $BOXID
+
+To copy to ``/home/vagrant``::
+
+  vagrant upload $SRC .
+  vagrant upload $SRC .  $BOXID
+
+To copy to ``/home/vagrant/$DIR``::
+
+  vagrant upload $SRC $DIR
+  vagrant upload $SRC $DIR  $BOXID
+
+https://www.vagrantup.com/docs/cli/upload.html
+  Uploads files and directories from the host to the guest machine.
+
+There is 3rd patry option with::
+
+  vagrant plugin install vagrant-scp
+  vagrant scp $SRC :$DST
+  vagrant scp $SRC $BOXID:$DST
+
 Working with Alpine Linux
 =========================