Vagrant Enable Rsync

Source: Internet
Author: User

It took so long to find these smb,nfs,virtualcfs, these synchronization schemes are not perfect under Windows. The perfect or rsync, I use it to synchronize the code on Windows, open the virtual machine in the Windows browser page only 500 milliseconds, compared to the previous 2.3 seconds, almost fly!

There is the MySQL data files do not have to be placed in the Windows host, because access to MySQL only PHP program to access, so, I will be the capacity of the virtual machine to 40G, should not use so much. Usually write code in the Windows host, and then use Rsync to synchronize the Windows code to the virtual machine, note that this is only a single synchronization, only Windows to the virtual machine synchronization. This will be happy to develop!

Key steps to configure rsync:

1. Download Cygwin

2. Installing rsync software with Cygwin

3. Find a Vagrantbox, write a vagrantfile file

Add in 4.vagrantfile:

Vagrant.configure ("2") do |config|    Config.vm.synced_folder "C:/work", "/home/wwwroot/default",    Type: "Rsync",    Rsync__args: ["--verbose", "-- Rsync-path= ' sudo rsync ', '--archive ', '--delete ', '-Z ']end

Other configuration parameters are not changed, specific rsync configuration parameters please refer to the official website: https://www.vagrantup.com/docs/synced-folders/rsync.html

Vagrant Enable Rsync

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.