rsnapshot 1.2.9 in Ubuntu Dapper (6.06 LTS)UPDATED 28.i.2007: This page has been updated. What this page describes now is how to install version 1.2.9 of
rsnapshotand keep it at that version until Dapper catches up. I feel for my purposes, this behaviour is preferred over the behaviour as described in the previous version of this page which getsrsnapshotto track the version in Edgy, i.e. use whatever version ofrsnapshotis available from Edgy.
The package rsnapshot is available in the Ubuntu universe
repositories. However, version 1.2.9 which has some newer, useful
features is currently only available in Edgy (6.10), but not Dapper
(6.06). Since Dapper is the LTS version (and in particular will have
guaranteed updates for 5 years) it is a better distribution than Edgy
for applications such as backup servers - i.e. we should try to use as
many packages from Dapper as possible.
Here are some notes on how to cherry-pick the rsnapshot package from Edgy and use it in Dapper.
We'll need to uncomment the universe lines in /etc/sources.conf,
i.e. uncomment
deb http://gb.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ dapper universe
and
deb http://security.ubuntu.com/ubuntu dapper-security universe
deb-src http://security.ubuntu.com/ubuntu dapper-security universe
To take the rsnapshot package from the Edgy rather than Dapper, we
need to configure APT to maintain our server as a "mixed system", as
they call it in the APT manual. We add the following lines to
/etc/preferences to pin the packages to keep Edgy packages available
but default to Dapper:
Package: *
Pin: release a=dapper
Pin-Priority: 990
Package: *
Pin: release a=edgy
Pin-Priority: 70
and the following lines to /etc/sources.list so that APT knows where
to find the Edgy packages:
## Edgy repositories
deb http://gb.archive.ubuntu.com/ubuntu/ edgy main restricted universe
deb http://gb.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe
deb http://security.ubuntu.com/ubuntu edgy-security main restricted universe
Now we can install rsnapshot using the following commands:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install rsnapshot=1.2.9-1
The last command tells apt-get to install version 1.2.9-1 (which at
the time of writing is the latest version for Edgy).
What happens when we later do an apt-get upgrade? The behaviour is
explained in man apt_preferences, which is the ultimate reference.
Here we give an explanation using our example.
We need to consider at least three versions of the rsnapshot package:
The currently installed version has priority 100 (this is apt-get's
behaviour). The latest versions from Dapper and Edgy are given in our
/etc/apt/preferences file as 990 and 70 respectively. Since the
versions have different priorities, we only need to consider the first
two rules "never downgrade" and "install the highest priority".
What happens if there's a new version in Dapper? In this case, the
highest priority is the latest from Dapper. Now, if the latest
version from Dapper is newer than 1.2.9-1 (i.e. the currently
installed version), then APT will upgrade rsnapshot with the latest
version from Dapper. Whereas if the latest version is no newer than
1.2.9-1, despite it having the higher priority, the "no downgrade"
rule prevails and rsnapshot isn't upgraded. So what happens, in a
sense, is that rsnapshot stays at version 1.2.9-1 until a newer
version appears in Dapper.
What happens if there's a new version in Edgy? Well, nothing. That's because the version from Edgy will still have priority 70 which is lower than the priority of the currently installed package (100). The "install the highest priority" rule would mean that APT won't ever try to upgrade the currently installed version with any version from Edgy.