ua_restore: enable restore from archive#1372
Conversation
12ac7d7 to
66ba50e
Compare
|
On first try doing a restore archive while no archive exist give a mixed result of sentences The last line shouldn't be there. |
|
My idea was that we should also tell the user that a normal backup exists if trying to restore an archive similar to when an archive backup exists while doing a normal restore. If this behaviour is not wanted, i can easily remove it. |
Ok then we can improve the message. maybe by using ". Try a normal restore <...> instead." |
bruno-at-bareos
left a comment
There was a problem hiding this comment.
Hi Sebastian, I've requested comments, and changes. Let discuss them.
bruno-at-bareos
left a comment
There was a problem hiding this comment.
I believe there's still an error 2025 in systemtests/tests/restore-test/testrunner-archive-restore-file
We can remove the second volume creation on systemtests/tests/restore-test/testrunner-create-backup
Then I will wait @pstorz feedback about the accurate, you made a point about restore 12. and also on the singular/plural form in core/src/dird/ua.h
|
There's still an opened question @sebsura the total time consumed to run the different tests is quite large And that's on my computer, I didn't yet check at Jenkins. |
Can you tell me how long it the bareos-basic:simple-backup-and-restore test takes for you ? Edit: the master build took 13m57s for tests while this build took 14m12s on jenkins. I cannot tell how high the increase in cpu time was though. Do you know of a way to check ? |
We can open a discussion tomorrow with other to see if it is a none problem. |
|
Running on rebooted computer and recreated containers seems to fix the long runtime Let's drop the concern about this subject. |
f41ccb7 to
9f1ac27
Compare
There was a problem hiding this comment.
The question raised about bvfs_get_jobids can be eluded. By default the functionality will stay with jobtype=B and there's no need to implement research for other related job with jobtype=A
There's a tests systemtests/tests/python-bareos/test_bvfs.py:97 which check that functionality, and we don't break it here.
Users were already able to restore jobtype=A with the /bareos-webui/restore/versions and they will still able (because only one jobid is used in that case).
I approve then the code here.
We need to squash the commit before the approval.
bruno-at-bareos
left a comment
There was a problem hiding this comment.
I think we are ok globally. so now we can move to the squash commit together stage.
9e5faed to
6807469
Compare
|
Squashed commits; also added the test we spoke about. |
bd14835 to
c3e5c56
Compare
f91b44e to
4a41eda
Compare
bruno-at-bareos
left a comment
There was a problem hiding this comment.
Final approvement, ready to merge
|
I resolved the last open conversations since they were already addressed. |
Add the archive argument to the restore command. If that argument is suppied we instead only look at archives instead of normal backups. Show an informational message if trying to restore from an archive/normal backup if no suitable backup exists, but one of the other kind does exist.
We create some new tests that specifically test the restore behaviour of normal backups as well as archives.
A (non-existent) directory that contained a file that was softlinked by a file in weird-files, was still named bacula. This commit recreated those softlinks to instead link into a directory named bareos.
b68355d to
0cc358f
Compare
Thank you for contributing to the Bareos Project!
Adds an 'archive' keyword to the restore command. When that keyword is present the restore command looks for jobs of type 'A', i.e. archive jobs, when selecting a suitable job for restoration instead of jobs of type 'B'.
This PR also adds 'Archive' to the possible tab completions of
update volstatus=.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
Source code quality
Tests