dcosson / vagrant-unison2

Vagrant plugin to sync local files to VM using Unison over SSH
MIT License
50 stars 8 forks source link

Careful with vagrant unison-cleanup, wiped out my entire root Vagrant folder (in Windows) #31

Open manolkalinov opened 7 years ago

manolkalinov commented 7 years ago

Coming from rsync, I wanted two-way syncing. I had trouble setting unison2 up. After downloading the 2.48.3 exe, setting up Vagrantfile, then vagrant up-ing, unison sync kept failing, so after installing unison in the guest machine as well, it kept failing again for some other reason. Finally, decided that it might be a good idea to cleanup/reset the unison database, just in case...bad idea. It rm -rf-ed the host's root vagrant folder and took several projects with it.

In the readme, does the last part of this sentence refer to the risk of using the command => 'Run vagrant unison-cleanup to clear the unison metadata from ~/Library/Application Support/Unison/ as well as all files.'? If so, then maybe the warning "as well as ALL files" should be more prominent.

The good thing is that at this point in time, I didn't have anything extremely important among the projects, except my Vagrantfile, which was opened in Notepad++, so I was able to salvage it.

Windows 10 x64, VMware Workstation 12.5

It was my fault for not being careful, so this isn't so much of an issue being opened, as much as a warning to people to watch out.

derimagia commented 7 years ago

It only deletes the files from the guest machine. If this wasn't the case something else happened in your case (If you were running another instance for example it may have synced the deletions up)

dasginganinja commented 4 years ago

This occurs when you have the local sync folder as ".". I had previously experienced this.