I've setup a Vagrant box that runs my webserver to host my Symfony2 application. Everything works fine except the folder synchronization.
I tried 2 things:
Option 1: First option works, I actually don't know how file is shared but it works. Files are copied in both way, but the application is SUPER slow. Symfony is generating cache files which might be the issue, but I don't really know how to troubleshoot this and see what is happening.
Option 2: Sync is only done in one way (from my local machine to the vagrant box), which covers most of the case and is fast. Issue is that when I use symfony command line on the vagrant box to generate some files they are not copied over to my local machine.
My question is: What is the best way to proceed with 2 ways syncing? With option 1 how can I (as it might be the issue) exclude some files from syncing. With Option 2 how can I make sure changes on remote are copied to my local machine?
If default synced folder strategy (VirtualBox shared folders, I imagine) is slow for your use case, you can choose a different one and, if you need, maintain the two-way sync:
Rsync is very fast but, as you've pointed out, is one-way only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With