Installation
This describes how I installed the EMC Legato client version 7.1.12 on Debian GNU/Linux 32-bit and 64-bit. If you intend to install these binaries on system with AMD64 architechture you have to install ia32-libs. Version 7.3.2 is to be released with 64-bit support. The following procedure is just for the CLI, as the servers I'm responsible for have no graphical or desktop interface. The Legato client is shipped as RPM-package, so to start with you have to alienate the file:
alien lgtoclnt.rpm
I choose not to install the deb-package that alien generated. Instead I unpacked the deb.
dpkg -X lgtoclnt.deb
Then I continued with copying the necessary files to their folder respectively:
/usr/sbin/nsrexecd /usr/sbin/nsr_shutdown /usr/sbin/save /usr/sbin/savefs /usr/bin/nsrports /usr/bin/recover
In order to control the client use the following script that I grabbed from https://www.cs.uwaterloo.ca/twiki/pub/CF/LegatoClient/mp_networker [1] and then made some minor improvment. Save it as ''networker'' in /etc/init.d/.
#!/bin/sh
#
# Modified from networker.sh as installed by FreeBSD port of Legato client
# and also from existing Debian init scripts
# mpatters@cs.uwaterloo.ca - 21 July 2004
# mupdate to backup.cs.uwaterloo.ca 3 Nov 2006, Mike Gore
# for plg4.cs.uwaterloo.ca
# Added by John Parnefjord
NSR_KEEPALIVE_WAIT=30
export NSR_KEEPALIVE_WAIT
NSREXECD=/usr/sbin/nsrexecd
# Set
SERVER=backupserver.domain.net
# Changed by John Parnefjord
N=`basename $0`
case "$1" in
start)
if [ -x ${NSREXECD} ];
then
echo -n ' Networker: '
start-stop-daemon --start --quiet --exec $NSREXECD -- -s $SERVER
echo $NSREXECD
fi
;;
stop)
echo -n "Stopping Networker client: $NSREXECD"
start-stop-daemon --stop --quiet --exec $NSREXECD
echo "."
;;
*)
echo "Usage: $N {start|stop}" >&2
exit 1
;;
esac
exit 0
Old script that comes with Legato, replaced with the script above
#!/bin/sh
NSR_KEEPALIVE_WAIT=30
export NSR_KEEPALIVE_WAIT
case "$1" in
start)
echo -n "Starting NetWorker daemons: "
if [ -f /usr/sbin/nsrexecd ]; then
echo -n " nsrexecd"
#
# Allow access from only the specified hosts.
#
/usr/sbin/nsrexecd -s backupserver.domain.net
fi
#if [ -f /usr/sbin/nsrd ]; then
# echo " nsrd"
# /usr/sbin/nsrd
#fi
echo "."
;;
stop)
echo -n "Stopping NetWorker daemons"
if [ -f /usr/sbin/nsr_shutdown ]; then
echo -n "Shutting down using nsr_shutdown -a -q"
/usr/sbin/nsr_shutdown -a -q
fi
echo "."
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
echo "usage: `basename $0` {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
Set the appropriate permissions and see to that it is executable.
chown root:root /etc/init.d/networker chmod 755 /etc/init.d/networker
Try to start the client:
/etc/init.d/networker start
Then check if the process is running
ps aux | grep nsrexecd
You should recieve something like this:
root 20893 0.0 0.0 4096 804 ? Ss 15:06 0:00 /usr/sbin/nsrexecd -s backupserver root 20894 0.0 0.0 4560 1592 ? S 15:06 0:00 /usr/sbin/nsrexecd -s backupserver
If everything went fine, stop the client:
/etc/init.d/networker stop
Be aware that when stopping the client you may see a complaint that nsradmin can't be found, but I haven't bothered about since the backup and recover is working. The nsradmin is called from /usr/sbin/nsr_shutdown. When the daemon is started it creates some necessary files in /nsr. In /nsr/cores/nsrexecd/.nsr one can specify files that are to be excluded from the backup. The /nsr/res/nsrla.res file contains the configuration for the client. The log in /nsr/logs/daemon.log can be quite handy if you need to debug. Don't forget to set the networker to start automatically:
update-rc.d networker defaults 95
The default setting for the client is to listen to ports within the interval 7937-9936. I choose to specify the ports explicitly instead. The ports can be changed either by using the nsrports command or by editing the configuration file located in /nsr/res/nsrla.res. For example to set the ports using nsrports when nsrexecd i srunning, type:
nsrports -S 7937-7938
If editing /nsr/res/nsrla.res you can easily see where put the port numbers:
administrator: "isroot,host=backupserver", "isroot,host=backupserver.domain.net", root@servername, "user=root,host=localhost"; disable directed recover: No; migration server:; type: NSRLA; resource identifier: 2.0.250.71.89.4.25.69.192.168.0.10(6) administrator: *@localhost; connection ports: 10001-30000; service ports: 7937-7938; type: NSR system port ranges; resource identifier: 4.0.250.71.89.4.25.69.192.168.0.10(1)
Notice that at least two ports need to be open on the server for access from the backup server and that the traffic uses the TCP as well as the UDP protocol. One thing to bear in mind is that the client must be able to make a reverse DNS lookup of the server in order to work, either by naming the server in the DNS or setting a name in the hosts file. Check the log file in /nsr/logs/daemon.log for error messages. Typically you will see access denied in the log. Restart the daemon in order to get the new config going. It may be a good idea to check connectivity from server side using Legatos administrative interface by initiating a backup and see if it fails.
Recovering data
After a backup is performed it good practice to test if it is possible to recover files. Start the recover client:
recover -c servername /home/johnp
recover: Current working directory is /home/johnp/
recover> destination
recover files into their original location
recover> relocate /home/johnp/recoveredfiles/
recover> destination
recover files into /home/johnp/recoveredfiles
recover> ls
...
recover> add
recover> add
...
recover> recover
recover: Total estimated disk space needed for recover is 1772 KB.
Recovering 11 files within /home/johnp/ into /home/johnp/recoveredfiles/
Volumes needed (all on-line):
00000019 at \\.\Tape1
backupserver.domain.net.003.RO at U:\\_AF_readonly
Requesting 11 file(s), this may take a while...
./johnp/file1
./johnp/file2
./johnp/file3
./johnp/file4
./johnp/dir1/
./johnp/file5
./johnp/file6
./johnp/file7
./johnp/file8
./johnp/file9
./johnp/dir2/
Received 11 file(s) from NSR server `backupserver'
Recover completion time: Mon Jun 19 11:05:17 2006
recover> exit
Error messages
A while a ago I recieved an error when testing a restore of a file.
johnp@servername:~$ recover /home/johnp/ not in index will exit. Enter directory to browse:
But I could never choose any file or directory to restore. The reason for that was that the index had been corrupted on the backup server due to inconsistency in the filesystem. Anyway, after fixing the filesystem errors, I returned to the recovery console but I could only see a handful of files in the list. That was easily explained by the fact only a incremental backup has been run during the night, so only the files that had been changed since last backup showed up. The index was probably reset in some way and only the changes were merged into it.