Upgrade and roll back
Move to a new version and, if something fails, go back to the previous one.
Video course · OpenNCCM from scratch · in Spanish
Copias y actualizaciones
Lesson 9.2 of 30 · Module 9 · Administration
See the full courseNew versions are published in the GitHub repository. When one is available, OpenNCCM tells administrators with a pop-up message. You can upgrade from the web interface (Administration → System → Updates → Update now, since 1.6.0) or with a command on the server; both do exactly the same:
sudo opennccm update==> Buscando actualizaciones (stable)…
Actualización disponible: 1.2.0 → 1.3.0## 1.3.0- …novedades de la versión…
¿Actualizar ahora? [s/N] s==> Creando copia previa✓ Copia previa: /var/lib/opennccm/pre-update/AAAAMMDD-HHMMSS_v1.2.0==> Instalando 1.3.0==> Iniciando y verificando✓ OpenNCCM actualizado: 1.2.0 → 1.3.0Options
Section titled “Options”| Command | Action |
|---|---|
sudo opennccm update --check |
Only shows whether there is a new version and what is new |
sudo opennccm update --yes |
Upgrades without asking (for automated tasks) |
sudo opennccm update --version v1.2.0 |
Installs a specific version (also used to downgrade) |
opennccm status |
Says whether an update is available |
The installed version appears at the bottom of every page. The pre-update backups are kept in /var/lib/opennccm/pre-update/ (the 5 most recent).
Roll back to the previous version
Section titled “Roll back to the previous version”sudo opennccm rollbackIt shows a menu with the pre-update backups (newest first) and restores the code and database from that moment.
Good practices
Section titled “Good practices”- Review what is new with
opennccm update --checkbefore upgrading. - If the server is a VM, take a snapshot before upgrading.
- Upgrade outside the scheduled backup hours.