Upgrading MultiFlexi¶
Target Audience: Administrators Difficulty: Intermediate Prerequisites: Root or sudo access; working backup
Before You Upgrade¶
Read the release notes for the target version on GitHub Releases.
Create a database backup — see Backup and Recovery.
Verify free disk space: migrations can temporarily double index sizes.
Schedule a maintenance window if jobs are running in production.
Standard Upgrade (APT)¶
MultiFlexi is distributed via the repo.multiflexi.eu APT repository. A standard upgrade is:
sudo apt update
sudo apt upgrade multiflexi
This upgrades the main web package. To upgrade all ecosystem components at once:
sudo apt update
sudo apt upgrade
Tip
To upgrade only MultiFlexi packages (not the whole system):
sudo apt upgrade $(apt list --installed 2>/dev/null | grep multiflexi | cut -d/ -f1 | tr '\n' ' ')
What Happens During Upgrade¶
dpkgstops the affected services (scheduler, executor, eventor)New package files are installed
The
postinstscript runs database migrations via Phinx automaticallyServices are restarted
The migration step may take a few seconds to several minutes depending on database size.
Verifying the Upgrade¶
# Check installed version
dpkg -l multiflexi | grep multiflexi
# Check all MultiFlexi packages
dpkg -l | grep multiflexi
# Verify services are running
systemctl status multiflexi-scheduler multiflexi-executor multiflexi-eventor
# Verify web interface loads
curl -s -o /dev/null -w "%{http_code}" http://localhost/multiflexi/
Upgrading Individual Components¶
The MultiFlexi ecosystem is modular. Components can be upgraded independently as long as dependency version constraints are satisfied.
# Upgrade only the executor
sudo apt install multiflexi-executor
# Upgrade only the core library
sudo apt install php-vitexsoftware-multiflexi-core
# Upgrade CLI tools
sudo apt install multiflexi-cli
# Upgrade a credential plugin
sudo apt install multiflexi-abraflexi
After upgrading a core library, restart all services:
sudo systemctl restart multiflexi-scheduler multiflexi-executor multiflexi-eventor
Database Migration Notes¶
Migrations run automatically during package install/upgrade. To run them manually:
# Run pending migrations
sudo -u multiflexi php /usr/share/multiflexi/vendor/bin/phinx migrate -c /etc/multiflexi/phinx.php
# Check migration status
sudo -u multiflexi php /usr/share/multiflexi/vendor/bin/phinx status -c /etc/multiflexi/phinx.php
Warning
Never skip migrations when upgrading multiple versions. Always migrate sequentially through each intermediate version if skipping releases.
Rollback Procedure¶
If an upgrade fails, restore from backup and downgrade:
# Stop services
sudo systemctl stop multiflexi-scheduler multiflexi-executor multiflexi-eventor
# Restore database (see backup-recovery)
sudo mysql multiflexi < /path/to/backup.sql
# Downgrade to specific version (if still in APT cache)
sudo apt install multiflexi=2.2.6
# Restart services
sudo systemctl start multiflexi-scheduler multiflexi-executor multiflexi-eventor
Note
Downgrading is only safe when no forward-only migrations have been applied. Always test upgrades in a staging environment first.
Upgrading Docker Deployments¶
cd /path/to/multiflexi-docker/
# Pull new images
docker compose pull
# Recreate containers with new images
docker compose up -d --force-recreate
# Check logs
docker compose logs -f
See Docker Deployment for the full Docker deployment guide.
See Also¶
Backup and Recovery — How to back up before upgrading
Database Maintenance — Migration details
Configuration — Configuration changes between versions