Please read the "Updating Bareos" section of the Bareos documentation. https://docs.bareos.org/IntroductionAndTutorial/UpdatingBareos.html
In addition also read the release notes which may provide additional steps to take care of while upgrading. https://docs.bareos.org/Appendix/ReleaseNotes.html