#!/usr/bin/perl use strict; use warnings; =pod =head1 DESCRIPTION Step 2 of backing the system to tape. Run from the sysbak root. Mounts the root partition, and starts the NFS service. =cut use Sys::Hostname qw( hostname ); my $hostname = hostname(); my $command; if( $hostname ne 'ivory' ) { $command = 'mount /mnt/bak/root.ro'; system $command and die 'unable to execute: ' . $command; $command = '/etc/init.d/nfs start'; system $command and die 'unable to execute: ' . $command; print "\n"; print "= insert a tape at ivory, and run:\n"; # print " =\@ivory> /etc/init.d/portmap start (if portmap or nfs not started previously)\n"; print " =\@ivory> sysbak-2t $hostname\n"; } else { print "- to run web server during backup\n"; print " =public\@obsidian> sync-web\n"; print " =\@$hostname> /etc/init.d/apache2 start\n"; print "\n"; print "= insert a tape, and press return\n"; ; exec '/usr/local/bin/sysbak-2t ivory'; } =pod =head1 AUTHOR Michael Allan =cut