Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

1 Answer 1

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.