|The help pages are provided by Hipatia volunteers to help wiki contributors.|
|Help index: Mediawiki — Server configuration — LaTeX — Streaming — Templates|
Search for help:
Preparing the upgrade
Before proceeding with upgrades, it is important to read the release notes at http://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html, which describes possible problems that could be encountered during a dist-upgrade.
Important files to backup
Some of the important files and directories to backup are:
and the output of <syntaxhighlight lang="bash">dpkg --get-selections</syntaxhighlight>
It is also important to backup all the dotfiles in the users' home directories and also to notify users about the upgrade and the consequent downtime of services.
Before actually upgrading the system, it is a good practice to upgrade critical packages manually (apache, mysql, apt, kernel, udev)
If you are accessing the system from a remote console and cannot access the system locally, it is recommended to use the virtual console provided by the screen program.
NOTE: before performing the upgrade, the lenny system should be updated at its latest release.
Check the system status before upgrading
In some cases, the use of apt-get for installing packages instead of its front-end aptitude might make aptitude consider a package as "unused" and schedule it for removal. In general, you should make sure the system is fully up-to-date and "clean" before proceeding with the upgrade.
In order to check this, just launch aptitude and press "g" to see if there are any pending actions to be performed.
Before upgrading APT pinning should be disabled to allow the upgrade of packages to their newer version.
Then you should check with <syntaxhighlight lang="bash">dpkg --audit</syntaxhighlight> if there are any packages with status 'half-installed' or 'failed-config' check also if there are any hold packages by performing <syntaxhighlight lang="bash">dpkg --get-selections | grep "hold"</syntaxhighlight>
if aptitude is being used on the system, you should also check with <syntaxhighlight lang="bash">aptitude search "~ahold"</syntaxhighlight>
Finally, remember to disable from /etc/apt/sources.list any unofficial sources or backports.
After all these checks, the actual upgrade to the newer version can be performed.
Note: you have to perform a dist-upgrade for every version you are upgrading to, so you cannot skip versions during upgrade (i.e. don't upgrade the system directly from 4 to 6, but do every step)
Check to have sufficient hard disk space on hard drive
Finally, before going on with the upgrade, you should check to have all the required storage space available in your system (in the partition that holds /var and in your /). Every package that is downloaded by apt from the repositories is stored in /var/cache/apt/archives.
<syntaxhighlight lang="bash" enclosure="div">apt-get -o APT::Get::Trivial-Only=true dist-upgrade
[ ... ] XXX upgraded, XXX newly installed, XXX to remove and XXX not upgraded. Need to get xx.xMB of archives. After this operation, AAAMB of additional disk space will be used.</syntaxhighlight>
Additional tips and tricks
A good practice is to record the upgrading session with the script program. In this way, you will have a log of the whole upgrade process: <syntaxhighlight lang="bash">script -t 2>~/upgrade-squeezestep.time -a ~/upgrade-squeezestep.script</syntaxhighlight>
If you have used the -t switch for script you can use the scriptreplay program to replay the whole session:
<syntaxhighlight lang="bash">scriptreplay ~/upgrade-squeeze.time ~/upgrade-squeeze.script</syntaxhighlight>