#1841 Issue closed: How to have 2 versions of Rear installed concurrently for testing?

Labels: support / question, fixed / solved / done

ccjung opened issue at 2018-06-22 15:17:

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

ReaR version ("/usr/sbin/rear -V"):Relax-and-Recover 2.1-git.2325.fc6e788.master / 2017-07-16
OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):

PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"

ReaR configuration files ("cat /etc/rear/site.conf" or "cat /etc/rear/local.conf"):

# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.conf
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is.
# Our packages will never ship with a site.conf.
EXCLUDE_MOUNTPOINTS=( /iso_fs /opt/commvault /opt/IBM/ITM /opt/splunkforwarder /opt/teamquest /var/opt/BESClient /hana/backup /hana/data /hana/log /hana/shared /usr/sap /usr/sap/basis /usr/sap/srm /PA_backup )
EXCLUDE_COMPONENTS=( /dev/mapper/20017380034880032 /dev/mapper/20017380034880033 /dev/mapper/20017380034880034 /dev/mapper/2001738003488003b /dev/mapper/2001738003488003e /dev/mapper/2001738003488003f /dev/mapper/20017380034880040 /dev/mapper/20017380034880041 /dev/mapper/20017380034880042 /dev/mapper/20017380034880043 /dev/mapper/20017380034880044 /dev/mapper/20017380034880045 /dev/mapper/20017380034880046 /dev/mapper/20017380034880047 /dev/mapper/20017380034880048 /dev/mapper/20017380034880049 /dev/mapper/2001738003488004a /dev/mapper/2001738003488004b )

System architecture (x86 compatible or POWER and/or what kind of virtual machine): POWER

Are you using BIOS or UEFI or another way to boot? Use Power HMC SMS

Brief description of the issue:
We want to have both versions 2.1 and 2.4 installed and used concurrently.

Is there a way to keep the existing Rear version (2.1) installed on a production server and install and use the new version of Rear (2.4) to create the ISO backup so we can restore the 2.4 version in the Disaster recovery servers?

Thank you.

jsmeix commented at 2018-06-25 09:10:

how to use our current ReaR upstream GitHub master code
separatedly from within its own separated directory
in addition to whatever other ReaR that is instelled elsewhere.

When you git clone our current ReaR upstream GitHub master code
you can git checkout any git commit you like so that you can also
checkout an older released ReaR version (or any other
particular git commit state you like) out of such a GitHub
master code repository.

For example to git clone our current ReaR upstream GitHub master code
and then git checkout the git commit that matches the ReaR 2.2 release
you can do:

# git clone https://github.com/rear/rear.git

# mv rear rear.github.release.2.2

# cd rear.github.release.2.2

# git log --format="%H %cI %s %b" | grep '2\.2' | cut -b-120
e4dc19ed2e6640f23bb180579e0ff73e2fdc5f0f 2017-12-20T15:04:13+01:00 Update release nr 2.2 to 2.3 
5d5e3171e04c880e5a56dcd3bf981233d80031b8 2017-11-29T08:01:23+01:00 Changed the macro fedora_release into fedora to fix i
=> 3th and last back-track patch for Debian (rear-2.2)
fd13be8f1bb091e1d324d35d3be527b34346a38e 2017-07-20T09:51:54-04:00 prepare for release v2.2 
f47f705c0857e46b93c2ccc49b8ba504c05559eb 2017-07-14T12:16:29+02:00 Update rear The redirection of stdout into the log fi
27c26e64b2adabc177f45f02c135b1f4d7377136 2016-12-06T17:12:32+01:00 Corrected issue #1106 "Extended partition not detecte
5c0de3be452ef6de7c11de60cd1a43da9226357d 2016-08-22T08:52:37+02:00 validation report Gentoo/2.2/i386.txt 

You have to somewhat imaginatively search the git log output
for an entry that seems to match a particular ReaR release
and compare that with the ReaR release dates in the
ReaR release notes at
that read e.g. for ReaR version 2.2

Version 2.2 (July 2017)

so that this git commit entry matches best in this example

fd13be8f1bb091e1d324d35d3be527b34346a38e 2017-07-20T09:51:54-04:00 prepare for release v2.2

We can git checkout this one (from within the rear.github.release.2.2 directory):

# git checkout fd13be8f1bb091e1d324d35d3be527b34346a38e
Note: checking out 'fd13be8f1bb091e1d324d35d3be527b34346a38e'.
You are in 'detached HEAD' state.
HEAD is now at fd13be8f prepare for release v2.2

# git log --format="%H %cI %s %b" | head -n1
fd13be8f1bb091e1d324d35d3be527b34346a38e 2017-07-20T09:51:54-04:00 prepare for release v2.2

i.e. now (within the rear.github.release.2.2 directory)
you are exactly at the state after this commit:

# usr/sbin/rear -V
Relax-and-Recover 2.2 / Git

When you do not like that you can go back to the
latest ReaR upstream GitHub master code
(all within the rear.github.release.2.2 directory)

# git checkout master
Previous HEAD position was fd13be8f prepare for release v2.2
Switched to branch 'master'
Your branch is up to date with 'origin/master'.

# usr/sbin/rear -V
Relax-and-Recover 2.4 / Git

If you perfer to try out the ReaR 2.3 release:
(all within that same rear.github.release.2.2 directory
where now that directory name is wrong but it is only its name)

# git log --format="%H %cI %s %b" | grep '2\.3' | cut -b-120
37bfa9c8591a69c83ea48bae73b6b0286ac36e8c 2017-12-20T16:22:57+01:00 ReaR 2.3 release 
e4dc19ed2e6640f23bb180579e0ff73e2fdc5f0f 2017-12-20T15:04:13+01:00 Update release nr 2.2 to 2.3

 # git checkout 37bfa9c8591a69c83ea48bae73b6b0286ac36e8c
Note: checking out '37bfa9c8591a69c83ea48bae73b6b0286ac36e8c'.
You are in 'detached HEAD' state.
HEAD is now at 37bfa9c8 ReaR 2.3 release

# usr/sbin/rear -V
Relax-and-Recover 2.3 / Git

Of course you can use several such directories in parallel.

jsmeix commented at 2018-06-25 09:24:

I noticed right now that you have SLES11
and - at least on my SLES11 system - I get

# git clone https://github.com/rear/rear.git
Cloning into 'rear'...
error: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version while accessing https://github.com/rear/rear.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

I am not at all a sufficient expert to know about the details behind why it fails
but I guess it is related to a change at GitHub that rejects protocols which are
no longer considered to be sufficiently secure nowadays like SSLv3/TLS1
or things like that.

I think a feasible workaround is to do the git stuff on a more modern system
(e.g. on SLES12 it works for me) and then copy the ReaR git directory content
onto the SLES11 system into its own separated directory.

[Export of Github issue for rear/rear.]