Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2001 09:29:19 -0500 (CDT)
From:      mark tinguely <tinguely@web.cs.ndsu.nodak.edu>
To:        mariodoria@yahoo.com, questions@FreeBSD.ORG
Subject:   RE: Remote dumps
Message-ID:  <200108311429.f7VETJT57532@web.cs.ndsu.nodak.edu>

next in thread | raw e-mail | index | archive | help
rdump only requires root access to open the restricted network port.
setuid the rdump application and using a non-privileged user will
close some of the root to root access sharing. If the setuid opens
too large of a concern, a modification of the rdump code to lower
the privilege after the socket has been opened should close any holes.

 
for example a machine to be backed up named "backme" and a machine
with a tape drive named "gotdrive".
 
on backme:

        this can be done in cron or sudo command before backup and
        reset after dump
# chmod 4750 /sbin/rdump
# chmod 664 /etc/dumpdates
# chown root.backup /sbin/rdump
# chown backup.backup /etc/dumpdates
# chgrp backup /dev/da0s1[afe]          # SCSI example
# cp ~backup/rhosts ~backup/.rhosts     # or .ssh/known_hosts
 
on gotdrive:
        this can be done in cron or sudo command before backup and
        reset after dump
# chown backup.backup /dev/nrsa0
# cp ~backup/rhosts ~backup/.rhosts     # or .ssh/known_hosts

from cron/command line of the backup account on gotdrive:
#!/usr/local/bin/bash

case `date| awk '{print $3}'` in 
1 | 2 | 3 | 4 | 5 | 6 | 7)  level=0;;
8 | 9 | 10 | 11 | 12 | 13 | 14)  level=1;;
15 | 16 | 17 | 18 | 19 | 20 | 21)  level=2;;
22 | 23 | 24 | 25 | 26 | 27 | 28)  level=1;;
29 | 30 | 31)  level=2;;
esac

# uncomment below to force a full backup
#level=0

 echo "dumping host: backme"
 echo "backme.DOMAIN remtape" > .rhosts
  /usr/bin/rsh -n backme /sbin/rdump ${level}usdf 39400 61000 gotdrive:/dev/rsa0 /dev/rda0s1a
  sleep 5
  /usr/bin/rsh -n backme /sbin/rdump ${level}usdf 39400 61000 gotdrive:/dev/nrsa0 /dev/rda0s1e
  sleep 5
  /usr/bin/rsh -n backme /sbin/rdump ${level}usdf 39400 61000 gotdrive:/dev/nrsa0 /dev/rda0s1f
 rm -f .rhosts



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108311429.f7VETJT57532>