-
Notifications
You must be signed in to change notification settings - Fork 6
Upgrade procedure
Radosław Korzeniewski edited this page Jan 22, 2019
·
2 revisions
During your exploitation of the Bacula and IBAdmin you'll need to make some components upgrade. Bacula upgrade should be performed according to its Release Notes until this new version is supported by IBAdmin. If not you will need to upgrade both Bacula and IBAdmin. This page will describe the upgrade procedure for IBAdmin only.
- Save application password which could be found at
DATABASES
section ofibadmin/settings.py
file. You'll need it after upgrade, i.e.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'bacula',
'USER': 'bacula',
# This needs to be updated during installation
'PASSWORD': '36d96b24594af4c57a1048555cb4ce07',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
- or grep for a password itself
grep "'PASSWORD':" /opt/ibadmin/ibadmin/settings.py
- Download the newest version if IBAdmin - https://github.com/inteos/IBAdmin/releases
- Stop both Bacula and IBAdmin services, including
ibadstatd
service.
systemctl stop bacula-dir
systemctl stop bacula-sd
systemctl stop bacula-fd
systemctl stop httpd
systemctl stop ibadstatd
- for debs based distributions you have to stop
apache2
service instead ofhttpd
- Extract new IBAdmin version to
/opt/ibadmin
, simply overwriting the old installation.
rm -rf /opt/ibadmin
tar xzvf IBAdmin.Community.2018.2.tar.gz
mv IBAdmin-Community.2018.2 /opt/ibadmin
- Execute upgrade procedure - Django migrations. You need to activate ibadmin engine in your shell first, i.e.
source /opt/ibadengine/bin/activate
- first upgrade IBADEngine virtualenv with the following command
pip install --upgrade -r /opt/ibadmin/requirements.txt
- then apply migrations
/opt/ibadmin/manage.py migrate
- it should output something like this
Operations to perform:
Apply all migrations: admin, auth, clients, config, contenttypes, dashboard, departments, jobs, roles, sessions, stats, storages, tasks, users, virtual
Running migrations:
Rendering model states... DONE
Applying clients.0001_initial... OK
Applying dashboard.0001_initial... OK
Applying dashboard.0002_auto_20170711_2124... OK
Applying departments.0001_initial... OK
Applying departments.0002_departments_color... OK
Applying departments.0003_auto_20170712_0405... OK
Applying departments.0004_permissions... OK
Applying jobs.0001_initial... OK
Applying jobs.0002_auto_20181203_1317... OK
Applying roles.0001_initial... OK
Applying roles.0002_permissions... OK
Applying stats.0003_permissions... OK
Applying stats.0004_auto_20181109_1437... OK
Applying storages.0001_initial... OK
Applying storages.0002_permissions... OK
Applying users.0001_initial... OK
Applying users.0002_profile_departments... OK
Applying users.0003_dashboardwidgets... OK
Applying users.0004_permissions... OK
Applying users.0005_auto_20181221_0854... OK
Applying virtual.0001_initial... OK
Applying virtual.0002_auto_20181203_1317... OK
- migrations should apply without problems, if not check the error and register a ticket.
- Now you have to restore application password saved at Preparation step 1, i.e.
export OLDPWD='36d96b24594af4c57a1048555cb4ce07'
sed -i "s/'PASSWORD': '.*',/'PASSWORD': '$OLDPWD',/" /opt/ibadmin/ibadmin/settings.py
- Start all required services
systemctl start httpd
systemctl start ibadstatd
systemctl start bacula-dir
systemctl start bacula-sd
systemctl start bacula-fd
- for debs based distributions you have to start
apache2
service instead ofhttpd
- default user is
admin
and passwordpassword
if upgrading from previous installations without users management - you can change password in user Profile/Edit or create new users in Users