Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[photorec] Feature: Only create report.xml #17

Open
amosonn opened this issue Jan 17, 2017 · 4 comments · May be fixed by #82
Open

[photorec] Feature: Only create report.xml #17

amosonn opened this issue Jan 17, 2017 · 4 comments · May be fixed by #82

Comments

@amosonn
Copy link

amosonn commented Jan 17, 2017

When recovering from a large disk, one might want to omit some files which are too big, or known to exist elsewhere, etc. Conversely, one might want to compare recoveries with different parameters, different tools, etc.

Currently, one still needs to have enough free disk space to have all these redundant files, or to have all versions of recovery. I suggest to have an option where photorec performs all the analysis, but doesn't actually write the recovered data to disk. It is simple enough, afterwards, to recover the actual files one wants by reading the xml, and most likely much less time consumptive than the original analysis. (Of course, there can also be a feature for processing a report.xml and recovering by its spec, so one can simply delete the items which are unwanted, but I assume this is a much larger feature.)

@amosonn
Copy link
Author

amosonn commented Jan 17, 2017

I can probably write this myself, but it might take me a while to get acquainted enough with the code. Could you please give me pointers where to look? Conversely, maybe it's so simple that it's easier for you to do it yourself?

Thanks a lot!

@cgsecurity
Copy link
Owner

Without writing the file to the disk, it's not possible to do all checks.
You can probably delete the recovered file in file_finish_aux(), see src/photorec.c

@amosonn
Copy link
Author

amosonn commented Jan 22, 2017

Thanks!
Yes, I figured up as much, already implemented this as an option. I will send a pull request when I get good internet access.
The only thing that I didn't manage was to remove the thumbnails, since they are written separately, without calling the file_finish-es, and I have no access to the high-level params there (to check whether to skip them). But I guess that's still good enough.

@amosonn amosonn mentioned this issue Feb 7, 2017
@amosonn
Copy link
Author

amosonn commented Feb 7, 2017

Coming next, I'm planning to write a lib which parses this xml and makes it available via fusermount. I don't think it fits here, but I will update anyway, for future seekers.

@amosonn amosonn linked a pull request Jun 28, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants