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

rename only repair mode (quickly skip non matching files) #184

Open
sjpotter opened this issue Aug 14, 2023 · 1 comment
Open

rename only repair mode (quickly skip non matching files) #184

sjpotter opened this issue Aug 14, 2023 · 1 comment

Comments

@sjpotter
Copy link

I currently ran into a situation where I accidentally renamed 1000 files (about 270GB in total) of files protected by multiple par2 sets (but all mixed together now).

It seems the only way to recover it is to iterate over every par2 file and pass in all the renamed files to the cmdline so it can see what can match.

However, it tries to do this to find blocks in all the files, so it scans them very slowly to do this.

I'm wondering if there would be better to have a "rename only" mode, where we make the assumption that the file really has no errors besides being renamed, so as soon as we see the start of the file doesn't match any of the files we expect, we can ignore it and move on, thereby saving huge amounts of IO.

an extra to this that would apply to regular repair as well would be, once the "needed extra blocks" drop to 0 (i.e. we have all the data needed and dont need to actual recover data, just rename the files we have) we can stop processing the extra files passed in and just go to rename mode if required.

thoughts?

@sjpotter
Copy link
Author

my quick and dirty thought for this is that in ScanDataFile() when we realize it's only a partial match, we return that its no match instead when in this mode.

perhaps there's a better way?

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

No branches or pull requests

1 participant