Updating Bacularis

General notes

Before upgrading please read the release notes in the Bacularis GitHub project on the Releases page in each Bacularis repository.

Binary packages update

For binary packages the upgrade procedure is automated and no additional action is required. The only command to run is the upgrade command by the system package manager.

Composer project update

For installations by Composer Bacularis stores own configuration inside the vendor directory. This configuration has to be preserved between updates. For this purpose on the Composer update command Bacularis creates in the project directory a TAR archive with configs and logs and restores them to the original locations just after successfull update.

From the above reason, to upgrade by Composer you need to have TAR archiver installed in the operating system and available in the system PATH.


Before upgrading please download from the project on GitHub https://github.com/bacularis/bacularis-app the latest composer.json file. Then copy it to the Bacularis project directory on local filesystem to replace the original composer.json file. This step is needed because Composer does not provide any way to update project files created by composer create-project command.

All upgrade process consists of running one Composer command. You can run it in one of two ways:

[EXPERTS ONLY] run upgrade as regular user

It is case running upgrade as any user that have read/write access to the all local Bacularis project files or that is theirs owner. At the end of successfull upgrade, you will see list of directories for which you will need to set read/write permissions for the web server user. Before doing it, please make sure that the system user is owner of all Bacularis files. Below you can see how to upgrade as the www-data user from the root user account:

cd /var/www/bacularis-app
chown -R www-data:www-data .
sudo -u www-data composer update

Manual installation update

If you installed Bacularis manually directly from source archives, here you can read the procedure updating this type environment.

First please set in the environment variable the version to which you would like to upgrade Bacularis:


Next you need to create temporary directory for new Bacularis files and go to it:

mkdir -p /tmp/bacularis-update
cd /tmp/bacularis-update

Now you need to download source archives with the new Bacularis version:

wget -O bacularis-api-$BACULARIS_VER.tar.gz https://github.com/bacularis/bacularis-api/archive/refs/tags/$BACULARIS_VER.tar.gz
wget -O bacularis-common-$BACULARIS_VER.tar.gz https://github.com/bacularis/bacularis-common/archive/refs/tags/$BACULARIS_VER.tar.gz
wget -O bacularis-web-$BACULARIS_VER.tar.gz https://github.com/bacularis/bacularis-web/archive/refs/tags/$BACULARIS_VER.tar.gz
wget -O bacularis-app-$BACULARIS_VER.tar.gz https://github.com/bacularis/bacularis-app/archive/refs/tags/$BACULARIS_VER.tar.gz
wget https://bacularis.app/downloads/bacularis-external-$BACULARIS_VER.tar.gz

After that there is needed to unpack new source archives and create internal application structure:

tar --strip-components 1 -zxvf bacularis-app-$BACULARIS_VER.tar.gz
tar --strip-components 1 -C protected -zxvf bacularis-external-$BACULARIS_VER.tar.gz
mkdir -p protected/vendor/bacularis/bacularis-common
mkdir -p protected/vendor/bacularis/bacularis-api
mkdir -p protected/vendor/bacularis/bacularis-web
tar --strip-components 1 -C protected/vendor/bacularis/bacularis-common -zxvf bacularis-common-$BACULARIS_VER.tar.gz
tar --strip-components 1 -C protected/vendor/bacularis/bacularis-api -zxvf bacularis-api-$BACULARIS_VER.tar.gz
tar --strip-components 1 -C protected/vendor/bacularis/bacularis-web -zxvf bacularis-web-$BACULARIS_VER.tar.gz
# NOTE: this backslash in cp is intentional
\cp -rf protected/vendor/bacularis/bacularis-common/project/* ./
cp protected/vendor/bower-asset/fontawesome/css/all.min.css htdocs/themes/Baculum-v2/fonts/css/fontawesome-all.min.css
cp -r protected/vendor/bower-asset/fontawesome/webfonts/* htdocs/themes/Baculum-v2/fonts/webfonts/

Later you can remove the source archives:

# Remove source archives
rm -f bacularis-common-$BACULARIS_VER.tar.gz \
     bacularis-api-$BACULARIS_VER.tar.gz \
     bacularis-web-$BACULARIS_VER.tar.gz \
     bacularis-app-$BACULARIS_VER.tar.gz \

Now you can start the upgrade. Here we assume that existing Bacularis is installed in a path /var/www/bacularis:

# NOTE: this backslash in cp is intentional
\cp -r /tmp/bacularis-update/. /var/www/bacularis