Install Retrospect on FreeBSD


Updated July 2020

I'm currently using FreeBSD 12.1 w/ Retrospect 17.0 (x64).


If you don't already have the Linux libraries installed, you will need to install and set them up, first.

Run this to enable Linux in /etc/rc.conf:

sysrc linux_enable=YES

Load Linux kernel support:

kldload linux

Install the latest CentOS binaries & libraries:

pkg install linux_base-c7

The Retrospect installer script uses bash, so you may want to install that and create a symbolic link for it, as well:

pkg install bash

ln -s /usr/local/bin/bash /bin/bash

Download the 64-bit Retrospect Linux client (check Retrospect's site for the current download link):

pkg install wget

wget https://s3.amazonaws.com/download.retrospect.com/software/linux/v1701/Linux_Client_x64_17_0_1_132.tar

Extract the archive:

tar xvf Linux_Client_x64_17_0_1_132.tar

Before running the installer, create a blank Retrospect State file to prevent an "invalid password" error:

touch /var/log/retroclient.state

Run the extracted script:

./Install.sh

Your output may look like this:

# ./Install.sh 

Install Retrospect Client? (y/n): y

Adding RETROSPECT_HOME to system profile and login scripts...Done!
Starting client as daemon... 
./Install.sh: line 194: /usr/local/retrospect/client/rcl: Not a directory

Installation was successful, but Retrospect Client for Linux could not 
be started. If this is an upgrade, please wait 5 minutes, then start 
the client manually by running  $ /usr/local/retrospect/client/rcl start
If your system uses an rc.local script, you should be able to start 
Retrospect Client for Linux automatically by adding the line 
'/usr/local/retrospect/client/rcl start'. Otherwise, consult your system 
documentation for the best method.

The installer will give errors, but that is normal (since this is an "unsupported" FreeBSD system).

The install script expected rcl to be created in /etc/init.d/. Since "/etc/init.d" doesn't exist on FreeBSD, the output of the command becomes the file with that name.

The script also attempts to create a symbolic link to the file:
/usr/local/retrospect/client/rcl -> /etc/init.d/rcl

The "fixes" to get Retrospect to run on FreeBSD are to move & rename a file, create a file, correct some file modes (optional), and then create a service script!

Move the script and overwrite the incorrect symbolic link:

mv /etc/init.d /usr/local/retrospect/client/rcl

Correct some file modes:

chmod o-x /usr/local/retrospect/client/*
chmod a-x /etc/retroclient.excludes

If you don't use the Linux procfs on FreeBSD (I don't), Retrospect Server will use the Linux mtab file to populate the list of volumes for the client, so any locations you want to back up need to be listed in that file.

You can create the /etc/mtab file, but Linux programs will look for the file at /compat/linux/etc/mtab. Unfortunately, that file is deleted and remade any time you update your Linux libraries (/compat/linux/etc/mtab is a symbolic link to /compat/linux/proc/self/mounts).

As a work-around, I create a symbolic link to the file that the Linux compatibility package uses:

mkdir -p /compat/linux/proc/self

ln -s /etc/mtab /compat/linux/proc/self/mounts

Here is a sample /etc/mtab file layout that you can use to back up some ZFS shares (modify with your paths):

/dev/da0p2 / ufs rw 0 0
/zfs/share /zfs/share zfs rw 0 0
/zfs/data /zfs/data zfs rw 0 0

If you use ZFS snapshots and have them set to visible, this next part is important!
Whatever locations you added to mtab above, add their snapshot directories to the /etc/retroclient.excludes file, as well:

# exclude zfs snapshots
/zfs/share/.zfs
/zfs/data/.zfs

If you don't exclude the .zfs snapshot directories, Retrospect will scan them all during backups! This can greatly increase backup times and possibly cause backups to fail.

Create the services directory (if it doesn't exist):

mkdir -p /usr/local/etc/rc.d

Copy and save the contents on this Retrospect Service page as "/usr/local/etc/rc.d/retro".

Make the service executable:

chmod +x /usr/local/etc/rc.d/retro

Run this to enable Retrospect in /etc/rc.conf:

sysrc retro_enable=YES

Once you have the Retrospect client running, make sure to enable exclusions with this command:

/usr/local/retrospect/client/retrocpl -exclude on