symlinks

Making sure symlinks work on CIFS/SMB mounted shares

I was recently working on some backup scripts to make sure I could clone all my GitHub repositories to my NAS, which I have mounted to a Raspberry Pi that handles all my backups.

I'm using gickup to run through all my GitHub repos and clone them locally, and I configured it to clone each repo directly into my NAS share, which is mounted over CIFS using something like:

sudo mount -t cifs -o uid=pi,username=myuser,password=mypass //my-nas-server/Backups /Volumes/Backups

Most repositories cloned correctly, but a few had symlinks inside, and when git was cloning them, the process would error out with:

Using SMB with symlinks instead of native synced folders with Vagrant and VirtualBox

VirtualBox's native shared folders will be used by default on Windows with the type of your synced folder set to nfs, or if it's not set. This method works great in many cases, but can be fairly slow when doing work with projects with many files in a synced folder, as is often the case with Drupal sites that I work with in Drupal VM.

Another option is to switch the type to smb. This is often a plug-and-play change (vagrant reload to make the change take effect—you'll likely need to enter in your Windows username and password during the startup process. However, symlinks inside the synced folder will likely break, and so we need to make one more important change:

The synced folder configuration needs to have: