Home
Man
Search
Today's Posts
Register

RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Recover deleted files on Linux server

Tags
debugfs, files, linux, recover, server

Login to Reply

 
Thread Tools Search this Thread
# 8  
Old 1 Week Ago
Quote:
Originally Posted by reminisce
Note: The directory was deleted with other use not root user.
That is irrelevant - dead is dead and deleted is deleted.

Quote:
Originally Posted by reminisce
In one of the youtube link ,the admin provided some steps to get back the lost files.


As first step, below command needs to be executed :
ps -aux | grep <filename>
As an output, I could find the file and process id .
That may help as long as the process is running: when a file is deleted the system routine unlink() is used, which deletes the inode (and thus every possibility to access the files data). As long as at least one process still has this file opened, though, the unlink() is postponed, so the process still can access the file even though "from outside" the file already ceases to exist.

This means, if you can somehow get "inside" the process in question and if you can bring the process to write the file (or, at least, its inode information) then you can use this to restore the file, otherwise it is lost.

You might have luck with trying TestDisk as long as you haven't done anything further on that filesystem. My suggestion is to unmount it as soon as possible (preferably: NOW!) because the longer it is in use the bigger the chance that data which are still there (but unaccessible right now) will be overwritten (=definitely and ultimately lost forever).

I hope this helps.

bakunin
# 9  
Old 1 Week Ago
Quote:
Originally Posted by reminisce
This is the filesystem that is mounted on:
/dev/xvda2 on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
For debugfs to work on linux systems you need to use lsdel (list deleted files), for example:

Code:
linux:/tmp# debugfs /dev/md0 

debugfs 1.44.1 (24-Mar-2018)
debugfs:  lsdel
debugfs:

However, according to the man page:

Quote:
debugfs - ext2/ext3/ext4 file system debugger
This means that debugfs should not work for a zfs file system.

I do not use the xfs filesystem on any server, so I cannot help on xfs.

I suggest you find something similar to debugfs that works on the xfs filesystem which will help you locale deleted files (if the the deleted inode entries have not yet been cleared).
# 10  
Old 1 Week Ago
Hint: Try searching for:

Quote:
xfs_db - debug an XFS filesystem
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to recover the deleted file in Linux? raghur77 UNIX for Advanced & Expert Users 3 04-10-2014 06:20 AM
Recover deleted files from linux server machine.. pamu Red Hat 8 09-13-2012 04:18 AM
How to recover deleted file? parthmittal2007 UNIX for Dummies Questions & Answers 2 07-13-2012 12:22 PM
Recover deleted partition Chrisdot Emergency UNIX and Linux Support 7 08-29-2011 07:24 AM
how to recover from deleted etc in solaris 9 rahmantanko Solaris 11 06-14-2011 12:10 PM
Need to Recover Deleted Files unx100 Shell Programming and Scripting 6 01-04-2010 08:01 PM
How to recover deleted logical volume. webster5u Solaris 4 04-17-2009 12:55 PM
how to recover deleted files in unix namishtiwari UNIX for Dummies Questions & Answers 5 08-28-2008 01:08 PM
recover deleted file in unix arulkumar UNIX for Dummies Questions & Answers 7 05-30-2008 10:43 AM
Is there a way to recover files deleted using rm command??? kumarsaravana_s Shell Programming and Scripting 1 04-15-2007 05:23 PM
recover deleted files from memory stick dangral Linux 2 11-19-2005 04:45 PM
recover deleted files vjm AIX 1 03-30-2005 09:56 AM
Recover deleted files kuultak UNIX for Dummies Questions & Answers 2 11-01-2004 02:05 PM


All times are GMT -4. The time now is 12:29 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password