restore: add fileregex parameter#1587
Conversation
sebsura
left a comment
There was a problem hiding this comment.
This is a great change. You need to fix your commit formatting though. pr-tool check reports the following problems:
4af68f0e0 systemtests:add RestoreDirectory variable to allow changing default restore directory: headline too long
b8c4d33d9 docs: add fileregex parameter to restore command documentation: headline too long
68745e4 to
08b15b2
Compare
|
Is it okay now? |
Did you run |
|
pr-tool said the commits are fine now. |
No, I did not run |
|
Just saw the Bareos 23 announcement and I'm looking forward to the release in the near future. Is there still any chance this could make it into Bareos 23? |
642c5f5 to
2fafd70
Compare
|
Sorry for the late reply. Yes it is still possible to get it into 23. While we plan to release a preview of 23.0.0 very soon, it will still take some time for the real release. While testing the new feature a bit I noticed the following problem: |
That's great, thanks. |
|
I've now changed fileregex to behave more like the file parameter. If no JobIds are specified then it selects the most recent JobIds (before specified date) to restore from without asking the user or building the file tree. |
sebsura
left a comment
There was a problem hiding this comment.
The code changes are great. I added some comments to the doc & test. Once those are addressed, it will be approved.
|
Thanks for your suggestions. I've changed the file regex to something else so that it also contains files with special characters and whitespaces. There was also a small bug in |
61e00e1 to
ec9cb85
Compare
Co-authored-by: Sebastian Sura <124262655+sebsura@users.noreply.github.com>
the -d option on mapfile is only available on newer clients.
0f34f91 to
5d21b91
Compare
Thank you for contributing to the Bareos Project!
I'm currently using python-bareos to run automated restores and I'd like to filter by regex which files are restored. As far as I can tell this is currently not possible to do via
restorecommand (except when records were pruned), hence this PR.Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Check backport lineSource code quality
Tests