Debian upgrade rollback

Darryl Moore darryl-90a536wCiRb3fQ9qLvQP4Q at public.gmane.org
Tue Dec 8 17:20:18 UTC 2009



Lennart Sorensen wrote:
> On Tue, Dec 08, 2009 at 11:37:24AM -0500, Darryl Moore wrote:
>> Has anybody done this before?
> 
> No, but I have heard of someone doing something for the same purpose
> but in a much better way.
> 
> At the linux symposium someone showed a system using a ramdisk unionfs
> to test upgrades before doing them for real.
> 

That is certainly an interesting idea, and shouldn't be very hard to
implement.



>> I have configured rsnapshot.conf with the following backup directories:
>>
>>
>> #####################
>> #
>> #  System backups
>> #
>> backup  /boot   localhost/
>> backup  /usr    localhost/
>> backup  /etc    localhost/
>> backup  /lib    localhost/
>> backup  /bin    localhost/
>> backup  /sbin   localhost/
>> backup  /opt    localhost/
>> backup  /var/lib/apt    localhost/
>> backup  /var/lib/aptitude       localhost/
>>
>> Does anyone see anything wrong with this setup?
>>
>> There is very little information on restoring from a backup. Ideally, I
>> would run the backup immediately prior to the upgrade. If I need to
>> rewind it, I would like to simply copy back the files that were
>> changed,and remove any additional files that were added. Is there an
>> easy way to do this or do I need to write my own script to compare the
>> original files with the backups? rsnapshot-diff is great for comparing
>> between different backups, but I have seen nothing that checks any of
>> the backups against the originals.
> 
> You would have to restore everything to be sure you had rolled back
> everything.  Sounds very likely to go wrong.
> 

Backing up so that I can restore everything is the general idea. It
should be sufficient to look at the file timestamps and sizes to
determine what needs to be restored. No? The only files I don't have in
here are other subdirectories below /var/ I don't want to include them
because they probably contain dynamic data from live databases and such.
Backing them up with rsync while live may well break them, and I already
have suitable backup mechanisms for this data. Are upgrades likely to
affect files in these subdirectories? I though apt did not mess with
files in /etc/ and /var that already exist at the time of installation
so that they do not damage custom configurations.



> Some people do it by breaking a raid1 before doing an upgrade.  If the
> upgrade is bad, they switch to the other disk and resync the raid from
> that.  If it works fine, they simply add the other disk back into the
> raid and resync.
> 

That is certainly an interesting idea as well, however I'm not sure I
want every server to running raid on the root filesystem. That seems a
little more complicated then should be necessary.

cheers,
darryl
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list