Install foremost

marcusnet

Cadet
Joined
Jan 7, 2019
Messages
5
Hi,

I would like to install foremost on FreeNAS to recover deleted data. It was important xlsx file... (zipped xml)
Jails are not for me as they can not access files on ZFS pool...
Could you help me how can I do that?

Please avoid threads like why important to make backups. I turned on ZFS snapshots and missed to tick recursive checkbox... (Why this is not default?)
Yes, I do not have another backup from this machine. I have 5 TB ZFS volume, 1.9 TB in use...

Thank you,
Mark
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
What is that? Why do you think it would be useful to recover a deleted file from a ZFS file system?
Could you help me how can I do that?
I would say it is simply not possible but I don't know what this "foremost" thing is. FreeNAS is an appliance that is built on FreeBSD (Unix) and is specifically configured to prevent you from adding any software to it.
I turned on ZFS snapshots and missed to tick recursive checkbox... (Why this is not default?)
Sorry for your loss.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
Jails are not for me as they can not access files on ZFS pool...
Sure, you can mount any part of your pool to a jail. What use would a jail be if you couldn't mount the storage pool?
 

marcusnet

Cadet
Joined
Jan 7, 2019
Messages
5
What is that? Why do you think it would be useful to recover a deleted file from a ZFS file system?

I would say it is simply not possible but I don't know what this "foremost" thing is. FreeNAS is an appliance that is built on FreeBSD (Unix) and is specifically configured to prevent you from adding any software to it.
Sorry for your loss.

Foremost is an application which scan the disk and checks if there is deleted files which is not present in the metadata.
All in all, it can restore deleted files from the disks if their bits are not overwritten by another file data.
Yes, I lose filenames, but the content could be restored.

OK I will try with jails. I am not a freebsd expert, but I will do. Hope that jail will have block device access to the ZFS pool. (mount is not enough)

If you know a better application which helps to restore deleted files, please help.

Thank you,
Mark
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If it will run on FreeBSD at all, the answer is to install FreeBSD, and then install the software on FreeBSD. Then use the software as installed on FreeBSD to do what it's going to do.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
Foremost is an application which scan the disk and checks if there is deleted files which is not present in the metadata.
All in all, it can restore deleted files from the disks if their bits are not overwritten by another file data.
Yes, I lose filenames, but the content could be restored.
I did a very quick Google search and it appears some people have had some success with Foremost on ZFS, but it appears to be a program that you would need to download and compile.
Good luck.
 

marcusnet

Cadet
Joined
Jan 7, 2019
Messages
5
Hi,

Was a long night... I need some sleep.
Just a quick report for others:
- I made a full copy/clone of the ZFS disks. (dd was my friend)
- Installed a freeBSD 11.2
- Installed foremost from ports (https://www.freshports.org/sysutils/foremost/)
- imported zfs volume (zpool -f import poolname)
- Launched scan like: foremost -t xls,xlsx -i /dev/da1p2 -o /recovery/
- Now I have some files recovered... I have to check the content as the filenames are generated.

Lessons learned:
- Turn on "F_king" checkbox for recursive snapshots. (Guys please consider have is by default checked. I do not know where to raise.)
- SMB share edit-> Advanced mode -> Export Recycle Bin (same as before)
- Jais are not for recovery
- FreeNAS is not production ready with default configs! I will switch back to native linux and Ceph.

Regards,
Mark

ps.: It is not funny as I can lose my job if I could not restore this file...
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
please consider have is by default checked
Why? There are plenty of reasons why you would not want it checked, the tool tip explains exactly what it does, and the manual explains it further. There's really no reason you should be unaware of what it does.
I do not know where to raise.
On the FreeNAS bug tracker. redmine.ixsystems.com.
FreeNAS is not production ready with default configs
What about the "default config" is "not production ready"?
I can lose my job if I could not restore this file.
The file is that critical, and yet you don't have it backed up?

I'm sorry the file is lost, and I hope you're able to recover it. But this looks like the result of a series of poor, and preventable, decisions.
 

marcusnet

Cadet
Joined
Jan 7, 2019
Messages
5
Why? There are plenty of reasons why you would not want it checked, the tool tip explains exactly what it does, and the manual explains it further. There's really no reason you should be unaware of what it does.

On the FreeNAS bug tracker. redmine.ixsystems.com.

What about the "default config" is "not production ready"?

The file is that critical, and yet you don't have it backed up?

I'm sorry the file is lost, and I hope you're able to recover it. But this looks like the result of a series of poor, and preventable, decisions.

There is no tooltip on recursive option. I have checked now.
I have just checked ZFS documentation about snapshots. They were promising.
I have made a test of deletion and restore a file from the snapshot at the beginning... The mistake was that I did in root folder...

You have to be a ZFS and FreeNAS storage expert to be aware all of the options and settings to spin up freenas.
I switched from Ceph and Linux, to have the advantage of an appliance. Was the wrong decision as I am not so familiar with FreeBSD and ZFS.

My last external backup of that file at 2018.08.12. When I moved all the company data to the FreeNAS. At least this is what I have.

I would ask from you: How much time do you need to spend to have a production ready file storage? Expecting default configs and reading manuals.
Please consider people who are not working in silos like "storage expert" and have to work in DevOps style.
I have to take care of networking, database clusters, application env, mailing, monitoring, Cloud IaaS etc. It is not so simple to focus on just one thing. I spent lots of time on access permissions.

This file contains all the invoices for the past year. For security reason was not allowed to store locally or copy somewhere else.
When someone made a copy to start it from 2019 again, messed it up. I thought that I have the backup with snapshots and rsync to another freeNAS appliance.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
FreeNAS is not production ready with default configs!
This is not true. You just need to configure it correctly. There are MANY guides, but I bet you didn't use one or didn't use the correct one because you thought you already knew everything.
ps.: It is not funny as I can lose my job if I could not restore this file...
Nobody thought it was funny.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,079
When someone made a copy to start it from 2019 again, messed it up. I thought that I have the backup with snapshots and rsync to another freeNAS appliance.
I see what happened now. You have a backup server, but the backup is in the same state as the primary. You were using rsync to synchronize between two FreeNAS servers. The original file got deleted, the deletion was copied to the backup system, and in both systems there were no snapshots of previous state because snapshots were improperly configured.

I assure you, nobody thought this was funny. Good luck with recovering your data.
 
Joined
Jan 18, 2017
Messages
525
I sincerely hope you recover what you need and it appears foremost is worth investigating.

I would ask from you: How much time do you need to spend to have a production ready file storage? Expecting default configs and reading manuals.
I don't know about anyone else but I spent six months researching and testing storage solutions BEFORE I move all my data to FreeNAS, I had lost data before and I was finally sick of it.

This file contains all the invoices for the past year. For security reason was not allowed to store locally or copy somewhere else.
It might be time to reconsider your backup strategy even if it's a once a week replication to a drive that is kept in the server room in a fire resistant waterproof safe.
 
Top