Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I accidentally rsync-ed to a server using the delete attribute when I shouldn't have.

Is there any chance of getting the data on the server that rsync removed.. back?

share|improve this question

marked as duplicate by jasonwryan, slm, Thor, vonbrand, Renan May 8 '13 at 13:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This has to do with the filesystem being used, not rsync itself. Assuming ext[234], look at extundelete. There are similar tools for other filesystems.

There is no guarantee that you will get the files back. The files will remain on disk once deleted, but the act of deleting is really marking the space that they occupy as being available to other files again. This means that other files may overwrite the data that once was mapped to that file. For this reason, you should avoid writing data to the filesystem before trying to perform the undeletion.

share|improve this answer
I ran 'lsof|grep /path/to/file' on the server. And the file is then a file that should be there(but isnt). I get "WARNING: can't stat() xfs file system /var/fake/paigowpi/home2/paigowpi.monthly Output information may be incomplete." I think the data is lost. – Hermann Ingjaldsson May 8 '13 at 8:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.