website/docs: document the rsync synced folder type

This commit is contained in:
Mitchell Hashimoto 2014-01-10 18:15:49 -08:00
parent 55b0dffd36
commit e73d2c14b3
2 changed files with 51 additions and 0 deletions

View File

@ -173,6 +173,7 @@
<ul class="sub unstyled">
<li<%= sidebar_current("syncedfolder-basic") %>><a href="/v2/synced-folders/basic_usage.html">Basic Usage</a></li>
<li<%= sidebar_current("syncedfolder-nfs") %>><a href="/v2/synced-folders/nfs.html">NFS</a></li>
<li<%= sidebar_current("syncedfolder-rsync") %>><a href="/v2/synced-folders/rsync.html">RSync</a></li>
<li<%= sidebar_current("syncedfolder-virtualbox") %>><a href="/v2/synced-folders/virtualbox.html">VirtualBox</a></li>
</ul>
<% end %>

View File

@ -0,0 +1,50 @@
---
page_title: "RSync - Synced Folders"
sidebar_current: "syncedfolder-rsync"
---
# RSync
**Synced folder type:** `rsync`
Vagrant can use [rsync](http://en.wikipedia.org/wiki/Rsync) as a mechanism
to sync a folder to the guest machine. This synced folder type is useful
primarily in situations where other synced folder mechanisms are not available,
such as when NFS or VirtualBox shared folders aren't available in the guest
machine.
The rsync synced folder does a one-time one-way sync from the machine running
to the machine being started by Vagrant.
## Prerequisites
To use the rsync synced folder type, the machine running Vagrant must have
`rsync` (or `rsync.exe`) on the path. This executable is expected to behave
like the standard rsync tool.
## Options
The rsync synced folder type accepts the following options:
* `rsync__exclude` (string or array of strings) - A list of files or directories
to exclude from the sync. The values can be any acceptable rsync exclude
pattern. By default, the ".vagrant/" directory is excluded. We recommend
excluding revision control directories such as ".git/" as well.
## Example
The following is an example of using RSync to sync a folder:
<pre class="prettyprint">
Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__exclude: ".git/"
end
</pre>
## Re-Syncing
The rsync sync is done only during a `vagrant up` or `vagrant reload`. It
is not currently possible to force a re-sync in any way other than reloading.
We plan on exposing a command to force a sync in a future version of Vagrant.