Transactions and Rollback with RPM
You should receive a listing like this:
# up2date --list-rollbacks install time: Sun Jul 27 20:49:55 2003 tid:1059353395 [-] goo-1.0-1.0: install time: Tue Jul 29 20:44:25 2003 tid:1059525865 [-] foo-1-2:
This command is handy even if you are not actually using up2date, because the rpm command does not provide a way of displaying such information.
To undo a transaction, use the --undo option, which undoes the last transaction that was installed. Simply type:
# up2date --undo
If you want to roll back multiple transactions, run this command multiple times. The ability to roll back from the GUI is not supported.
RPM normally delivers packages using a best effort strategy, meaning if one or more RPMs fails to install, the remaining RPMs in the transaction still are installed. This is a desirable behavior in some environments, but in others it would be much better if, instead, RPM automatically rolled back the failed transaction. Because I work in such an environment (telecommunications), I wrote a patch called the auto-rollback patch. This patch allows you to configure RPM such that if a transaction fails, RPM automatically rolls back the failed transaction. It does leave behind the failed RPM if it failed in its %post scriptlet; hopefully that soon will be fixed (patches anyone?).
If you would like to use this feature, you can download the patch (or RPMs that have the patch applied) from lee.k12.nc.us/~joden/misc/patches/rpm. Once you have a version of RPM installed with the auto-rollback patch, you need to configure RPM to use the auto-rollback feature. To do so, edit /etc/rpm/macros and add the following macro definition:
After doing this, the next time you install/upgrade a set of RPMs and one fails to install, RPM automatically rolls back the failed transaction, except for the failing one if it failed in the %post scriptlet.
RPM transactional rollbacks provide an efficient way of undoing RPM upgrades. They also provide a solid building block upon which system update programs (such as up2date, yum and apt-get) can provide automated rollback functionality. However, transactional rollbacks are not for everyone. To quote Jeff Johnson, “the --rollback option...requires absolutely perfect system administration and is mostly mechanism, not policy.” Transactional rollbacks are an all-or-nothing affair. Care must be taken to ensure that all erasures are repackaged, as RPM's ability to roll back transactions is only as good as its source of repackaged packages. The administrator must ensure that extra space is allocated for the storage of the repackaged packages. Finally, RPM's transactional rollback feature is a work-in-progress. That said, RPM transactional rollbacks have come a long way from their beginnings. If you want to ensure that RPM updates to a system can be undone quickly, they may be exactly what the doctor ordered.
- why is GNOME 3 in the fifth position at 14.1 %?
4 hours 28 min ago
- Sublime Is Brilliant!
9 hours 31 min ago
9 hours 50 min ago
- Rapid[Disk,Cache] better than native ram caching?
10 hours 15 min ago
- Nothing is perfect
10 hours 29 min ago
- Mixtapes Community
16 hours 8 min ago
- KDE is one true DE
16 hours 42 min ago
- Command Line Shells (Bash, Zsh, etc.) are 2nd place
17 hours 11 min ago
19 hours 6 min ago
- yes it's Jupiter Broadcasting
20 hours 25 min ago