LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-02-2010, 09:30 AM   #1
Phier
Member
 
Registered: Nov 2009
Posts: 31

Rep: Reputation: 0
dpkg rollback


Hi all,

I'm just looking for suggestions on the many ways one might provide themselves a rollback feature for Debian packages.

All i need is to be able to roll back to the previous version of a package, if for example, an upgrade causes problems. Keeping a snapshot of all previous states of the system isn't necessary.

I want the rollback to leave existing configuration files in place.

Does simply uninstalling and reinstalling the older version from apt's cache guarantee this will work, or could changes in package dependencies cause problems?

A more pedantic approach might be to compare all the file contents of each .deb and create a log entry every time a file is changed on the server.

I've come across http://sourceforge.net/projects/apt-checkpoint/files/ and http://packages.debian.org/lenny/debdelta but i'm not sure if they suit my needs, and the former hasn't been developed for in quite some time.

Cheers.
 
Old 02-02-2010, 04:15 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
The former is similar to what you're looking for, however I have no functional experience with it. There is no perfect way to perform what you're asking for except to rsync the system off before every upgrade so you can rsync it back if you wish to revert the changes unless you get into doing shadow copies or backups of the entire system. When things get upgraded you may not be able to install the old package due to dependency changes. It is very hard to go down in version using package management tools after any significant upgrades.
 
Old 02-03-2010, 09:35 AM   #3
Phier
Member
 
Registered: Nov 2009
Posts: 31

Original Poster
Rep: Reputation: 0
apt-checkpoint seems to just create checkpoints when you tell it to rather than work on individual packages.

Would there be a way to find out what dependencies are not met and are required to upgrade a given package?

The way i'm being encouraged to do this is to work on a file by file basis, where files are transferred from a test platform to the server in question, so the server never actually performs an apt upgrade, it only deals with dpkg, and even conf file changes are done by comparing templates to the remote version and sed'ing any necessary changes.

Sounds a bit like re-inventing the wheel if apt can be used for this sort of thing...

Two key requirements though are: No user intervention for updating/rolling back and no changes are made without previously testing the upgrade works.
 
Old 02-03-2010, 10:17 AM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
I think the best way would be using rsync, but at some level there has to be either automated or manual testing to see if it should remain the same or rollback.
 
Old 02-03-2010, 10:57 AM   #5
Phier
Member
 
Registered: Nov 2009
Posts: 31

Original Poster
Rep: Reputation: 0
Hrm, would i be going down the wrong route by looking at any of the following?

http://en.wikipedia.org/wiki/Compari...ement_software
 
Old 02-03-2010, 11:05 AM   #6
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Some of those seem to be an applicable fit others less so. It depends how closely matched the development and production systems are and exactly you want to manage them and what the criteria and procedures and policies are in your organization.
 
Old 02-04-2010, 04:48 AM   #7
Phier
Member
 
Registered: Nov 2009
Posts: 31

Original Poster
Rep: Reputation: 0
In the meantime, would you know a way to display the unmet dependencies of a given package on a particular system?

I've come across apt-rdepends, but that doesn't compare what versions of other packages a package depends on Vs what's installed/in the cache.

Thanks again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 09:24 AM
dpkg is dead! error in /var/lib/dpkg/available dezert_fox Debian 4 11-22-2011 10:28 AM
dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the prob krishna.nitk Linux - Newbie 3 03-21-2009 02:41 PM
Ubuntu newbie, E: dpkg was interrupted, you must manually run 'dpkg --configure -a' ? chinkychan Linux - Newbie 1 01-28-2009 10:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration