Reply

Re: Recovering permanently deleted files from Readynas Pro

xtrips1
Aspirant

Recovering permanently deleted files from Readynas Pro

Hello,

 

How do you recover deleted files from a Readynas Pro?

I deleted a share thinking it would do that like under Windows.

I know I will lose the directory structure and the files names and extensions, but I know it can be done.

I saw it done once in the past already using command line and connecting to the NAS via ssh or similar.

Model: ReadyNASRNDP6620v2|ReadyNAS Pro 6 12TB (6 x 2TB Enterprise)
Message 1 of 26

Accepted Solutions
StephenB
Guru

Re: Recovering permanently deleted files from Readynas Pro

I don't know of a good way to do this.  You could try installing extundelete using ssh I guess.

 

Of course if there are disk writes, the ability to repair rapidly disappears.

 

If you had the network recycle bin enabled, you might be able to get some data back from there.

View solution in original post

Message 2 of 26

All Replies
StephenB
Guru

Re: Recovering permanently deleted files from Readynas Pro

I don't know of a good way to do this.  You could try installing extundelete using ssh I guess.

 

Of course if there are disk writes, the ability to repair rapidly disappears.

 

If you had the network recycle bin enabled, you might be able to get some data back from there.

Message 2 of 26
ElfD
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

Power down the unit asap and contact Netgear support, you will most likely need to get a data recovery contract for something like this

Message 3 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

Hello, 

Would you like to help me further?

I am not exactly a Linux friendly person.

What is the command that downloads and installs extundelete, and its dependancies?

wget something right?

What is the syntax for Readynas, because what I found is for other linux flavours.

When I get it running I will use the net to investigate further but I need the first kick.

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 4 of 26
Sandshark
Sensei

Re: Recovering permanently deleted files from Readynas Pro

The ReadyNAS is mostly Debian Linux, so what you are finding on the web should work fine if it's for Debian.  Note that most will say you have to start commands with "sudo", but you don't on a ReadyNAS because you are logged in as root.  But if you do not know this most basic thing about Linux, are you sure you want to tackle this yourself?  Anything you do wrong could eliminate any chance of data recovery.

Message 5 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

Hello,

I think I will be fine if only I get that extundelete running.

The problem at the moment is that the apt command calls for files situated on the www.readynas.com website which seems to be unavailable at the moment and I have no idea if this is temporary or not.

Is there an alternate address for those files?

And if so where do I edit the address called by the apt command?

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 6 of 26
Sandshark
Sensei

Re: Recovering permanently deleted files from Readynas Pro

Are you still running OS4.2.x on the Pro?  I've never had that issue, but I've been running OS6.x on mine for some time.  Since the Debian distro on whihc OS4.2.x is based is so old, you may have to update your repository list.

Message 7 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

That’s right, I am running 4.2.31

first things first, I must get that extundelete running.

how do I upgrade th repository list?

who’s willing to help?

 

then what do you mean? Can my old NAS be upgraded to the 6.x version os?

how?

can you provide a link for the procedure?

 

 

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 8 of 26
Sandshark
Sensei

Re: Recovering permanently deleted files from Readynas Pro

I've not run a 4.2.x system for some time.  Unavailability of current packages was a significant part of my decision.   So, I'm afraid I can't help you with specifics.  But I stress again that if you are having to ask this type of question, you may want to consider getting paid assistance before something goes terribly wrong.

 

Yes, you can upgrade to 6.x.  Instructions were posted over 4 years ago.  OS6-now-works-on-x86-Legacy-WARNING-NO-NTGR-SUPPORT.  Don't go past the first page, as most of the rest is no longer applicable.

Message 9 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

Thank you for the link.

 

Gosh, isn’t there anybody that can guide through the simple steps of downloading extundelete and its dépendancies from an alternate source, copy them on the Nas with putty, and run some simple install commands?

I was a sysadmin for Windows servers and exchange for 13 years. I think i can manage. I just don,t have the time to forage the net for the answers. 

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 10 of 26
Sandshark
Sensei

Re: Recovering permanently deleted files from Readynas Pro


@ There may be somebody who is willing/able to guide you through setting up the xtrips1 wrote:

Thank you for the link.

 

Gosh, isn’t there anybody that can guide through the simple steps of downloading extundelete and its dépendancies from an alternate source, copy them on the Nas with putty, and run some simple install commands?

I was a sysadmin for Windows servers and exchange for 13 years. I think i can manage. I just don,t have the time to forage the net for the answers. 


If you think that's how applications are installed in Linux, then that's part of the problem.  You are expecting it to work like Windows and it doesn't.  Your Windows experience is not any help here.  There may be somebody who is willing to tell you how to set up repositories for Debian Etch, which was EOL 7 years ago, I'm just not that person.  It's not "simple" as you state, and there are not many users in the Forum with that level of experience.  I moved to OS6 precisely because I did not want to have to deal with that.  If you do something wrong, you can totally mess up the NAS operating system and your chance of recovery goes to zero (assuming it's not that already).

 

There is one command that should do it all apt-get install extundelete.  But for that to work, your sources.list has to point to the now-archived Debian Etch repository and you have to do an apt-get update after the list is updated.  And, of course, somebody has to have made a version of the program for Etch, or else you'll have to compile it yourself. 

 

One thing to your advantage here is that the ReadyNAS has separate OS and data partitions, so installing an application won't overwrite some of your deleted data.

Message 11 of 26
StephenB
Guru

Re: Recovering permanently deleted files from Readynas Pro


@Sandshark wrote:
And, of course, somebody has to have made a version of the program for Etch, or else you'll have to compile it yourself. 

 


I'm not seeing a built package for etch here: https://packages.debian.org/search?keywords=extundelete&searchon=names&suite=all&section=all

Message 12 of 26
jihssan
Tutor

Re: Recovering permanently deleted files from Readynas Pro

First you have to install putty on you computer.

install from extundelete from http://extundelete.sourceforge.net/ and move it to your readynas  so you can access to it and install it.

now you can access to your readynas using putty, for that, enter the ip address of your nas in host, and a console will open inviting you to enter your username and password.

type:

 

su
apt-get update
apt-get upgrade

     

apt-get install e2fslibs-dev 
apt-get install build-essential
apt-get install bzip2

 

after, on the console, you can view all your data using cd //, so you can acces to the extundelete file.

 

df -h (to get an idea of disk use and get the path you need)

access to extundelete directory by using this command

cd path (ex cd /var/ftp/Backup)

the extundelete is bz2 extension so you have to unzip it using bzip2

bunzip2 extundelete-0.2.4.tar.bz2

you'll get a new folder extundelete... containing the uncompressed files

access to this new folder using 

cd ext..... (use tab key to get the whole name )
 
./configure
make
make install (optional if you want to place it in bin folder)

 

to check the name of the drive to recover:
fdisk -l
to restore all:
extundelete /dev/sda4 --restore-all
 to restore a directory: 
extundelete /dev/sda1 --restore-directory /[directory]/
sudo extundelete /dev/sda1 --restore-directory /[directory]/
So, i hope this will help you.
Don't hesitate if you have questions.
Message 13 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

Excellent help.

But here is what I get:

 

NOVANAS:/c/media# cd extundelete-0.2.4
NOVANAS:/c/media/extundelete-0.2.4# ./configure
Configuring extundelete 0.2.4
configure: error: in `/c/media/extundelete-0.2.4':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
NOVANAS:/c/media/extundelete-0.2.4# make
bash: make: command not found

 

What's next?

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 14 of 26
StephenB
Guru

Re: Recovering permanently deleted files from Readynas Pro

FWIW, doing an apt-get upgrade on the NAS is not recommended, and can do damage.

Message 15 of 26
Sandshark
Sensei

Re: Recovering permanently deleted files from Readynas Pro

And all of this copying, compiling, etc. is being done in C, where the deleted data lies; so it's making recovery much less likely.

Message 16 of 26
jihssan
Tutor

Re: Recovering permanently deleted files from Readynas Pro

It seems missing the development tools 

Try this command

apt-get install build-essential

 

Message 17 of 26
jihssan
Tutor

Re: Recovering permanently deleted files from Readynas Pro

Why you think it will damage the nas 

can you explain please 

i tried it on mine and its working perfectly 

Message 18 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

This is the output:

 

NOVANAS:~# apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package build-essential has no installation candidate

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 19 of 26
jihssan
Tutor

Re: Recovering permanently deleted files from Readynas Pro

Type this command line and tell me the output please

Message 20 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

Sure. Which one?

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 21 of 26
StephenB
Guru

Re: Recovering permanently deleted files from Readynas Pro


@jihssan wrote:

Why you think it will damage the nas 

can you explain please 

i tried it on mine and its working perfectly 


One of many posts on the subject:  https://community.netgear.com/t5/Using-your-ReadyNAS/scared-adding-entries-to-etc-apt-source-list/m-... That post is for OS 4.1, but actually applies to all ReadyNAS.  Some packages are customized and intentionally down-rev.

Message 22 of 26
jihssan
Tutor

Re: Recovering permanently deleted files from Readynas Pro

I forgot pating the command, sorry about that

the command is

nano /etc/apt/sources.list

Message 23 of 26
xtrips1
Aspirant

Re: Recovering permanently deleted files from Readynas Pro

-bash: nano: command not found

 

My situation is bad, isn't it?

Model: ReadyNAS RNDP6000|ReadyNAS Pro 6 Chassis only
Message 24 of 26
Sandshark
Sensei

Re: Recovering permanently deleted files from Readynas Pro

Nano is an editor you also need to install.  But VI is pre-installed, so you can use it instead.

Message 25 of 26
Top Contributors
Discussion stats
  • 25 replies
  • 6610 views
  • 1 kudo
  • 5 in conversation
Announcements