Search:  
Gentoo Wiki

HOWTO_Symantec_Backup_Exec_Remote_Agent_for_Linux_and_Unix_Servers

Contents

Introduction

Warning: The backupexec-ralus ebuild has been rejected for inclusion into Portage on the grounds that the binary package contains too many security problems. For more details refer to the Gentoo Bugzilla.

Symantec Backup Exec Remote Agent for Linux and Unix Servers (RALUS) enables Windows Server network administrators to perform backup and restore operations on Linux, Unix and Solaris hosts that are connected to the network.

Preparation

Package Files

Due to licensing restrictions RALUS will need to be fetched and placed manually.

Fetching RALUS

Placing the RALUS Files

# mv Q180968.BE.RALUS.10.1.5629.3.tar_279329.gz /usr/portage/distfiles
# mv ralus5629HF21_282308.zip /usr/portage/distfiles

Setting Up Portage Overlay

File: /etc/make.conf
PORTDIR_OVERLAY="/usr/local/portage"

Creating the Ebuild Directory

# mkdir -p /usr/local/portage/app-backup/backupexec-ralus/files

Creating the Ebuild

Tip: Having problems with the ebuild? Then post a message on the Gentoo Forums.
File: /usr/local/portage/app-backup/backupexec-ralus/backupexec-ralus-10.1.5629.21.ebuild

Updated: 2007-07-02

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils rpm

MY_PV="10.1.5629.3"

GUIDE_DOC_ID="279401"
GUIDE_FETCH_URI="http://seer.support.veritas.com/docs/${GUIDE_DOC_ID}.htm"

RALUS_Q_ID="Q180968"
RALUS_DOC_ID="279329"
RALUS_FILE="${RALUS_Q_ID}.BE.RALUS.${MY_PV}.tar_${RALUS_DOC_ID}.gz"
RALUS_FETCH_URI="http://seer.support.veritas.com/docs/${RALUS_DOC_ID}.htm"

PATCH_DOC_ID="282308"
PATCH_FILE="ralus5629HF21_${PATCH_DOC_ID}.zip"
PATCH_FETCH_URI="http://seer.support.veritas.com/docs/${PATCH_DOC_ID}.htm"

VRTSRALUS_FILE="VRTSralus-10.00.5629-0.i386.rpm"
VRTSVXMSA_FILE="VRTSvxmsa-4.2.1-211.i386.rpm"

LINUX_PATCH_FILE="ralus5629HF21-Linux.tar"
LINUX_HOTFIX_FILE="HF21-Linux.tar"

DESCRIPTION="Symantec Backup Exec Remote Agent for Linux and Unix Servers (RALUS)"
HOMEPAGE="http://www.symantec.com/backupexec/"
SRC_URI="${RALUS_FILE} ${PATCH_FILE}"
LICENSE="VERITAS-EUSLA"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RESTRICT="fetch mirror"
DEPEND="app-arch/unzip"
RDEPEND="amd64? ( app-emulation/emul-linux-x86-compat )
	x86? ( sys-libs/lib-compat )"
S="${WORKDIR}"

pkg_nofetch() {
	einfo "Please download ${RALUS_FILE} from:"
	einfo "${RALUS_FETCH_URI}"
	einfo "and move it to ${DISTDIR}"
	einfo
	einfo "Please download ${PATCH_FILE} from:"
	einfo "${PATCH_FETCH_URI}"
	einfo "and move it to ${DISTDIR}"
}

src_unpack() {
	# unpack the package
	for i in ${VRTSRALUS_FILE} ${VRTSVXMSA_FILE}
	do
		einfo "Extracting: ${i}"
		tar -xzf "${DISTDIR}/${RALUS_FILE}" "linux/pkgs/linux/${i}" --strip-components 3 \
			|| die "Extracting ${i} failed"
		rpm_unpack "${WORKDIR}/${i}" || die "Extracting ${i} failed"
	done

	# unpack the hotfix
	einfo "Extracting: ${LINUX_HOTFIX_FILE}"
	unzip -pqq "${DISTDIR}/${PATCH_FILE}" "${LINUX_PATCH_FILE}" | tar -xO "${LINUX_HOTFIX_FILE}" | tar -x \
		|| die "Extracting ${LINUX_HOTFIX_FILE} failed"

	# merge the hotfix files
	mv -f "${WORKDIR}/beremote" "${WORKDIR}/opt/VRTSralus/bin"
	mv -f "${WORKDIR}/libndmpcomm.so" "${WORKDIR}/opt/VRTSralus/bin"
	mv -f "${WORKDIR}/ralus.ver" "${WORKDIR}/var/VRTSralus"

	# delete the original init script
	rm -f "${WORKDIR}/opt/VRTSralus/bin/VRTSralus.init"
}

src_install() {
	# install the package files to /etc
	dodir /etc/VRTSralus
	chmod -R 600 "${S}/etc"
	cp -aR "${S}/etc/VRTSralus" "${D}/etc" || die "Install failed"

	# install the package files to /opt
	dodir /opt/VRTS
	dodir /opt/VRTSralus
	dodir /opt/VRTSvxms
	chmod -R 500 "${S}/opt"
	cp -aR "${S}/opt/VRTS" "${D}/opt" || die "Install failed"
	cp -aR "${S}/opt/VRTSralus" "${D}/opt" || die "Install failed"
	cp -aR "${S}/opt/VRTSvxms" "${D}/opt" || die "Install failed"

	# install the package files to /var
	dodir /var/VRTSralus
	chmod -R 600 "${S}/var"
	cp -aR "${S}/var/VRTSralus" "${D}/var" || die "Install failed"

	# install the init.d file
	newinitd "${FILESDIR}/backupexec-ralus.initd" backupexec-ralus

	# install the conf.d file
	newconfd "${FILESDIR}/backupexec-ralus.confd" backupexec-ralus
}

pkg_preinst() {
	# add the beoper group
	enewgroup beoper
}

pkg_postinst() {
	elog
	elog "Configuration of /etc/VRTSralus/ralus.cfg is necessary for RALUS to function."
	elog "For more details consult page 808 of the Symantec Backup Exec 10d for Windows"
	elog "Servers Administrator's Guide."
	elog "${GUIDE_FETCH_URI}"
	elog
	elog "RALUS requires that a user be added to the beoper group to function. The"
	elog "user must have permission to access all the files selected for backup."
	elog "# gpasswd -a <user> beoper"
	elog
	elog "RALUS uses port 10000 by default. If this port is in use (e.g. Webmin)"
	elog "edit /etc/services and add the ndmp service with an available port."
	elog "ndmp <port>/tcp"
	elog
	elog "To start RALUS:"
	elog "# /etc/init.d/backupexec-ralus start"
	elog
	elog "To start RALUS at boot:"
	elog "# rc-update add backupexec-ralus default"
	elog
}

Creating the Init Script

Tip: Having problems (i.e. unable to start or stop RALUS) with the init script? Then try this alternate init script.
File: /usr/local/portage/app-backup/backupexec-ralus/files/backupexec-ralus.initd
#!/sbin/runscript

checkconfig() {
	if [ -z "$BEREMOTE_OPTS" ]; then
		eerror "You must set config options in /etc/conf.d/backupexec-ralus"
		return 1
	fi
}

start() {
	local retstatus=1
	local maxtry=15

	# delete pidfile
	rm -f /var/VRTSralus/ralus.pid
	rm -f /var/VRTSralus/ralus.errpid

	# display to the user what you're doing
	ebegin "Starting Symantec Backup Exec Remote Agent"

	#run the checkconfig function
	checkconfig || return 1

	# Start the process as a daemon and record the pid number
	start-stop-daemon --start --quiet --background --pidfile /var/VRTSralus/ralus.pid \
		--exec /opt/VRTSralus/bin/beremote -- ${BEREMOTE_OPTS} >/dev/null 2>&1

	while [ "$maxtry" != "0" ]; do
		if [ -f /var/VRTSralus/ralus.pid ]; then
			maxtry=0
		else
			maxtry=$(($maxtry-1))
			sleep 1;
		fi
		if [ -f /var/VRTSralus/ralus.errpid ]; then
			maxtry=0
		fi
	done

	if [ -f /var/VRTSralus/ralus.pid ]; then
		retstatus=0
	else
		retstatus=1
	fi

	# output success or failure
	eend $retstatus
}

stop() {
	# display a message to the user
	ebegin "Stopping Symantec Backup Exec Remote Agent"

	# stop the daemon using the pid recorded from the start() function
	start-stop-daemon --stop --quiet --pidfile /var/VRTSralus/ralus.pid --name beremote

	# delete pidfile
	rm -f /var/VRTSralus/ralus.pid
	rm -f /var/VRTSralus/ralus.errpid

	# output success or failure
	eend $?
}

Creating the Init Script Configuration

File: /usr/local/portage/app-backup/backupexec-ralus/files/backupexec-ralus.confd
BEREMOTE_OPTS="--log-file /var/VRTSralus/beremote.log"

Creating the Ebuild Digest

# ebuild /usr/local/portage/app-backup/backupexec-ralus/backupexec-ralus-10.1.5629.21.ebuild digest

Unmasking the Ebuild

# echo "app-backup/backupexec-ralus ~<arch>" >> /etc/portage/package.keywords

Installation

# emerge backupexec-ralus

Configuration

Configuring RALUS

Note: RALUS requires the following line with an appropriate media server to advertise it's presence. For more details consult page 808 of the Symantec Backup Exec 10d for Windows Servers Administrator's Guide.
Note: If the RALUS host is added to the "User-defined Selections" list on the media server then the configuration below is not required.
File: /etc/VRTSralus/ralus.cfg
Software\VERITAS\Backup Exec\Engine\Agents\Agent Directory List 1=<media server>

Adding a RALUS User

Note: RALUS requires that a user be added to the beoper group to function. The user must have permission to access all the files selected for backup.
# gpasswd -a <user> beoper

Configuring the Service Port

Note: RALUS uses port 10000 by default. If this port is in use (e.g. Webmin) add the ndmp service with an available port.
File: /etc/services
ndmp		<port>/tcp			# Network Data Management Protocol

Starting

To start RALUS:

# /etc/init.d/backupexec-ralus start

To start RALUS at boot:

# rc-update add backupexec-ralus default

Links

Retrieved from "http://www.gentoo-wiki.info/HOWTO_Symantec_Backup_Exec_Remote_Agent_for_Linux_and_Unix_Servers"

Last modified: Fri, 05 Sep 2008 06:27:00 +0000 Hits: 24,611