Community discussions

MikroTik App
 
tonicatel
newbie
Topic Author
Posts: 32
Joined: Fri Mar 10, 2017 8:47 pm

recover deleted files

Tue Jun 02, 2020 5:40 pm

Hello,

I was wondering if there was a way to recover a deleted authentication log on the mikrotik, just like you can recover deleted files on a pc.
 
IslaMujeres
just joined
Posts: 5
Joined: Sat Jun 10, 2023 11:47 pm

Re: recover deleted files

Sat Jun 17, 2023 1:35 am

Unfortunately no answers here, but i will add my five cents on this topic.
There are couple of great data recovery apps online (free and paid) and here is a great article about it https://www.handyrecovery.com/best-data ... -apps.html.
Of course you can try to use all of them at the same time, just not sure if that will bring some results. All the moves around delated data should be done very slowly and wisely, otherwise you ca delete them permanently.
Last edited by IslaMujeres on Wed Jun 21, 2023 2:00 am, edited 1 time in total.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12865
Joined: Thu Mar 03, 2016 10:23 pm

Re: recover deleted files

Sun Jun 18, 2023 12:10 pm

I don't think ROS has a "trash bin" functionality built-in ("trash bin" is sort of "quarantene" feature where deleting a file doesn't really delete it, it only moves it to a special folder, together with informatiin about file's original folder). This kind of functionality might be integral part of NTFS (or any other file system; I highly doubt it) or integral part of OS (Windows supports it but doesn't enforce it). But it's not part of ext3 (native file system of ROS) nor ROS itself (probably because it's not part of linux kernel, some linux windowing systems add such functionality.

Which means that recovery of deleted files is next to impossible in ROS ... if pissible, it's a tedious work with help of general linux installation (which alliws to install necessary tools).
 
r00t
Long time Member
Long time Member
Posts: 674
Joined: Tue Nov 28, 2017 2:14 am

Re: recover deleted files

Sun Jun 18, 2023 4:32 pm

Well, it's possible, but not easy. Depends on how valuable such deleted files might be... if it's worth the effort, here's a brief howto:
1) Do not touch or boot or do anything with that device, all usual rules for data recovery apply
2) You will have to netboot the correct OpenWRT image for your device architecture, so prepare DHCP + TFTP server etc. Upon boot it usually gets 192.168.1.1 with ssh access, read the openwrt documentation and wiki for more details.
3) Once you have remote access, you will have to dump the nand flash. You can for example use dd to copy /dev/mtdpartX to /tmp first and then download it from the device tftp put.
4) Test everything using other device that you are not recovering first, so you know what you are doing. Then dump the device with deleted files.
5) Once you have data partition dump, you can use various tools that support ext3 filesystem to recover the deleted files, from linux commandline tools to software like DMDE or R-Studio.
Good thing about having it dumped is you can now keep trying various software safely until you get some result. And device can now be used again, as everything important have been dumped.

Who is online

Users browsing this forum: anav, jaclaz, Mento and 48 guests