alxpanel-rollback
Returns the alxpanel packages and the panel's own database to a snapshot taken before an upgrade.
Run it as root. It is the same as alxpanel-upgrade rollback.
Usage
alxpanel-rollback [SNAPSHOT] [--yes]
| Argument | Meaning |
|---|---|
SNAPSHOT |
The snapshot to return to: a folder name from /var/lib/alxpanel/upgrade/snapshots/. Without it, the newest snapshot. |
--yes |
Do not ask for confirmation. Required when there is no terminal, for example from a script. |
Before it starts, the command shows the snapshot, how old it is and the versions it returns to, and asks Roll back now? [y/N].
What goes back, and what does not
Everything done in the panel since the snapshot goes back to that moment: accounts, sites, databases, passwords, settings. Customer files, customer databases and backups are not touched.
- Goes back: the
alxpanelpackages, and the panel's own database. - Stays: customer files, customer databases, and backups. Records of backups made after the snapshot are carried over, so those backups stay usable.
- Stays:
/etc/alxpanel. The one exception isagent.toml: when the older agent does not accept the current file, the copy from the snapshot replaces it, and the rejected file is kept in the job folder asagent.toml.rejected.
Things created on the server after the snapshot, such as a new account's files, are still on disk but unknown to the restored panel. They show up in the panel as drifts, or need to be created again.
Refusals
- No snapshots.
no snapshots to roll back to: nothing was ever upgraded on this server. - Packages no longer available. A snapshot normally carries its own copy of the packages. When it does not, and the repository no longer has that version either, the command refuses and changes nothing.
- Another upgrade or rollback is running.
Exit codes
| Exit code | Meaning |
|---|---|
| 0 | Rolled back. |
| 1 | Refused, or you answered no. Nothing was changed. |
| 2 | The rollback failed part way; the panel stays in maintenance and the message names the log. Also: unknown snapshot, wrong usage. |
| 3 | Another upgrade or rollback is running. |
Example
# ls /var/lib/alxpanel/upgrade/snapshots/
20261121T031502Z-0.1.20 20261122T030911Z-0.1.21
# alxpanel-rollback 20261121T031502Z-0.1.20
The log of the rollback is in /var/lib/alxpanel/upgrade/jobs/<job>/log and on the Panel updates page under History.