LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2016, 01:03 AM   #1
ITareliteralyMyInitials
LQ Newbie
 
Registered: Aug 2015
Posts: 16

Rep: Reputation: Disabled
Recovering data on a remote ubuntu server


Hi all,

I have recently removed by mistake some very important files on a remote server that i manage. I have been trying to read up on how I can recover those files .
However I feel like I still don't know what am doing ,
I tried restoring the folder by using this command

Code:
sudo extundelete --restore-directory /pathtomyfolder /dev/mapper/vg00-root
But it did not restore it. besides the fact that i cannot unmount/remount that partition since its a remote one .

Any ideas i can solve my issue with ?

The server is a (ubuntu 14.04)
 
Old 11-12-2016, 06:54 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,338
Blog Entries: 55

Rep: Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538
Quote:
Originally Posted by ITareliteralyMyInitials View Post
I have recently removed by mistake some very important files on a remote server that i manage. I have been trying to read up on how I can recover those files .
Please be forthcoming with and complete about information you share. The more relevant information you post the more efficient it is for us to help you.
- Most importantly: is this a Production environment or some expendable machine?
- Are backups made regularly, at what interval and is the restore procedure documented and tested?
- What files did you delete exactly?
- When did you delete them (aka how long have you been trying)?
- What kind of machine is this: physical hardware, virtual machine of which the host is under your control, cloud-based or what else?
- What kind of Out Of Band access / colo hands options do you have?


Quote:
Originally Posted by ITareliteralyMyInitials View Post
Code:
sudo extundelete --restore-directory /pathtomyfolder /dev/mapper/vg00-root
But it did not restore it. besides the fact that i cannot unmount/remount that partition since its a remote one .
The reason you can't umount it probably is more because this is the root file system.
 
Old 12-10-2016, 09:05 AM   #3
mitchd123
LQ Newbie
 
Registered: Jan 2009
Distribution: Ubuntu 14.04
Posts: 19

Rep: Reputation: 0
I am going to post a few comments for the community which confused me when running extundelete. Hopefully they can help you as well.

#1) The volume should be unmounted to avoid damage. I was struggling to find out what was holding my volume mounted, and used the lsof and fuser commands to find it out. You can also remount it read only with the command: mount -o remount,ro /dev/(your device.../sda6) You mentioned yours is remote, perhaps you can rebind it read only to a new device name? I'm not sure how to do this, just brainstorming.


#2) The command runs on the structure on the volume, not the actual mount point. So for example I had mounted a raid drive for "movies" on /mnt/raid/movies (mount /dev/md0 /mnt/raid)

I received the following errors:
extundelete: Operation not permitted while restoring file.
extundelete: Operation not permitted when trying to examine filesystem


The correct extundelete command for me was: extundelete /dev/md0 --restore-file movies/movie.mp4 (correct)
It was NOT extundelete /dev/md0 --restore-file /mnt/raid/movies/movie.mp4 (not correct)

#3) The restored files are put in a subdirectory of your current working directory

I had switched to the /tmp directory, so my file was restored to /tmp/RECOVERED_FILES/movies

I was doing a ls for the filename and I couldn't figure out where it went. It wasn't until I did a ls -sltr that I found the newly created directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sync Data between server and Remote ftp server Deemo Linux - General 2 09-14-2011 07:34 AM
unable to copy data to remote server using ncftp command ckiran04 Linux - Server 5 07-17-2011 08:41 AM
Recovering data from dead Samba server donrudi Linux - Server 2 01-31-2009 03:29 PM
Want to import an excel sheet data from from a remote linux server envisage Programming 1 01-31-2008 01:08 PM
Live data replicaton to remote server roballen Linux - Software 0 01-17-2006 09:23 AM


All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration