Red Hat Bugzilla – Bug 60153
Automatic backups of /var/lib/rpm
Last modified: 2008-05-01 11:38:01 EDT
A corrupted /var/lib/rpm, beyond all repair (see bug 60152), prompted me to
think about ways to recover from otherwise irrecoverable database damage.
Suggestion: Any package install/removal creates a dummy flag file; a cron.daily
job checks if the dummy flag file exists; if it exists the job copies
/var/lib/rpm to /var/lib/rpm. (a rotating backup set) while maintaining a
read-only lock on the database.
Then, if the database ends up corrupted beyond repair it should still be
possible to recover a clean database going back for at least five days.
There's nothing stopping you from doing backups of
critical files anytime you wish, rpm is not the