Objective
Update GLPI to a newer version while preserving data, configuration and plugins. Safe procedure with prior backups.
Prerequisites
- GLPI currently installed and functional
- Root or sudo access
- Sufficient disk space for backups
- Check compatibility: GLPI Documentation
WARNING: NEVER update in production without prior testing and a full backup!
Full Procedure
Step 1: Check the current version
cat /var/www/html/glpi/version.txt
Or via the interface: Configuration → General → Overview
Step 2: Enable maintenance mode
Configuration → General → System
- Check "Enable maintenance mode"
- Save
This prevents users from logging in during the update.
Step 3: Full backup
A. Backup GLPI files
mkdir -p /root/backup_glpi cp -r /var/www/html/glpi /root/backup_glpi/glpi_$(date +%Y%m%d)
B. Database backup
mysqldump -u root -p glpi > /root/backup_glpi/glpi_$(date +%Y%m%d).sql
C. Verify backups
ls -lh /root/backup_glpi/
Backups created: You should see the glpi_YYYYMMDD folder and the .sql file
Step 4: Download the new version
cd /tmp wget https://github.com/glpi-project/glpi/releases/download/10.0.17/glpi-10.0.17.tgz
Note: Replace 10.0.17 with the desired version. See: GitHub GLPI Releases
Step 5: Extract and replace
# Extract tar -xzf glpi-10.0.17.tgz # Remove old version (except config and files) rm -rf /var/www/html/glpi/* # Copy new version cp -r /tmp/glpi/* /var/www/html/glpi/ # Restore configuration cp -r /root/backup_glpi/glpi_*/config/* /var/www/html/glpi/config/ cp -r /root/backup_glpi/glpi_*/files/* /var/www/html/glpi/files/ cp -r /root/backup_glpi/glpi_*/plugins/* /var/www/html/glpi/plugins/ # Permissions chown -R www-data:www-data /var/www/html/glpi chmod -R 755 /var/www/html/glpi
Step 6: Update the database
Access the web interface: http://SERVER_IP/glpi
GLPI automatically detects that the database needs updating and displays the migration wizard.
- Log in with an administrator account
- Follow the update wizard
- Click "Continue" at each step
- Wait for the database migration to complete (may take several minutes)
Update successful: The message "Database update is complete" is displayed
Step 7: Disable maintenance mode
Configuration → General → System
- Uncheck "Maintenance mode"
- Save
Step 8: Update plugins
Configuration → Plugins
- Check plugin compatibility with the new version
- Update plugins if necessary
- Disable/Remove incompatible plugins
Post-Migration Verification
Version check
Configuration → General → Overview: verify the version number
Functional tests
- User login
- Create a ticket
- Search in the inventory
- Access reports
- Plugin functionality
Log verification
tail -f /var/log/apache2/glpi_error.log tail -f /var/www/html/glpi/files/_log/php-errors.log
Rollback Procedure (in case of problems)
Restore files
rm -rf /var/www/html/glpi cp -r /root/backup_glpi/glpi_20241215 /var/www/html/glpi chown -R www-data:www-data /var/www/html/glpi
Restore the database
mysql -u root -p DROP DATABASE glpi; CREATE DATABASE glpi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; EXIT; mysql -u root -p glpi < /root/backup_glpi/glpi_20241215.sql
Security and Best Practices
- Always test the update in a test environment before production
- Check the release notes (changelog) for major changes
- Schedule the update during a maintenance window (outside business hours)
- Inform users in advance
- Keep backups for at least 30 days
- Document the procedure and any issues encountered
- Check PHP compatibility (GLPI 10.x requires PHP 7.4 minimum)
Troubleshooting
Problem: Blank page after update
# Check PHP logs tail -f /var/www/html/glpi/files/_log/php-errors.log # Clear the cache rm -rf /var/www/html/glpi/files/_cache/*
Problem: Database error
- Check that the MySQL account has rights on the database
- Re-run the migration: access http://IP/glpi/install/update.php
Problem: Incompatible plugin
Temporarily disable the plugin:
mv /var/www/html/glpi/plugins/plugin_name /var/www/html/glpi/plugins/plugin_name.disabled
Key Points for the BTS Oral
- Full backup: files + database BEFORE any operation
- Maintenance mode: prevents concurrent changes during the update
- Database migration: GLPI automatically handles SQL schema changes
- Rollback: always prepare a rollback procedure
- Prior testing: never update directly in production without testing
- Compatibility: check plugins, PHP, MySQL before updating
- Maintenance window: schedule outside business hours