Search code examples
macosvagrantrsync

Undo deletion of files caused by rsync


I have a Cent OS 6 VM running on my Mac. I was developing remotely using a FTP directly on the VM. I had the vagrant-rsync-auto command running.

Not realizing that rsync-auto is running, I tried to copy the project I created onto my mac in the same directory where it is rsyncing. Apparently, I lost all the files I created which is one whole day's work.

Is it possible to have the files back?


Solution

  • This is a data recovery issue, not a programming issue, but I would venture a guess that it approaches close to 0% possible. Not only is the data gone/overwritten, but it was inside a VM so the recovery would have to be of the VM disk at an unknown point in time in the past which has since been overwritten by a newer machine state.

    Perhaps this will be a good lesson in creating backups / cron jobs or using version control, like Git?