Protect package/system upgrades from power outage
Written by 10110111 the 24 Mar 10 at 13:46.
New
Currently, if a package/the system is being upgraded, loss of power can bring the system to non-booting state because of half-upgraded/half-installed packages (especially the system ones).
Solution #2:
Install package to seperate directory first
Install the software to a seperate directory and then copy it to usr/bin or wherever
Install the software to a seperate directory and then copy it to usr/bin or wherever
Solution #3:
Make snapshot on filesystem level
Written by
dino the 25 Mar 10 at 07:58.
Saving the packages as backup still might end into a unbootable system. Install scripts may be get aborted while running leaving files corrupted behind - with no way to detect which files.
With a snapshot of the whole filesystem, at no time during the backup the system becomes into an unbootable state.
This does not take as much space as its sounds, if the snapshot is handled incremental.
Technical solutions:
* btrfs does have good snapshot support buildin
* LVM
* ...
Pro:
* much more robust
* fast
* less diskspace for backup needed
Con:
* only works well if /home is on another partition
Saving the packages as backup still might end into a unbootable system. Install scripts may be get aborted while running leaving files corrupted behind - with no way to detect which files.
With a snapshot of the whole filesystem, at no time during the backup the system becomes into an unbootable state.
This does not take as much space as its sounds, if the snapshot is handled incremental.
Technical solutions:
* btrfs does have good snapshot support buildin
* LVM
* ...
Pro:
* much more robust
* fast
* less diskspace for backup needed
Con:
* only works well if /home is on another partition
(otherwise userdata will be reset as well)
* does not work out-of-the-box with ext3/4
Taking the snapshot this way is really fast! Also this does NOT take up diskspace. Only the changes done while upgrading takes diskspace.
For more information check:
http://blogs.igalia.com/aperez/2008/06/more-btrfs-goodness-snapshots/
http://en.wikipedia.org/wiki/Copy-on-write
Solution #4:
Use logging to allow recovery on restart
Written by
ChrisB the 27 Mar 10 at 13:39.
If your computer loses power during an upgrade, when its restarted this should be detected by checking the logs. The problem should then be rectified by re-installing half installed packages and completing the upgrade process.
This should all happen behind the scenes in the boot process to provide minimum disturbance to the user.
If your computer loses power during an upgrade, when its restarted this should be detected by checking the logs. The problem should then be rectified by re-installing half installed packages and completing the upgrade process.
This should all happen behind the scenes in the boot process to provide minimum disturbance to the user.
Solution #5:
Use a 'System Restore Point' system
Written by
tomjb24 the 3 Apr 10 at 10:02.
Create automatic system restore points before updating system files - and give users the option a creating a manual restore point, restore through recovery mode if unbootable
Create automatic system restore points before updating system files - and give users the option a creating a manual restore point, restore through recovery mode if unbootable
Solution #6:
Include a Revision Control System in APT
There's a package etchkeeper that keeps /etc in a git or hg repository. APT/Dpkg does already share some features of RCSs (tracks how files belong to packages, can keep old versions, keeps meta data).
Why not improve APT to allow rolling back a broken upgrade/install?
There's a package etchkeeper that keeps /etc in a git or hg repository. APT/Dpkg does already share some features of RCSs (tracks how files belong to packages, can keep old versions, keeps meta data).
Why not improve APT to allow rolling back a broken upgrade/install?