Automated Dumps

Mark R. Ludwig uaisun4!mrl at uunet.uu.net
Mon Apr 29 05:20:00 AEST 1991


In article <2593 at brchh104.bnr.ca>, stubblef at stl-08sima (Glenda Stubblefield) writes:
>I need to develop the means to
>do automatic backups, both full and incrementals, through cron during off
>hours.  

I do not know if it is possible to bring the system down to single-user
and then back up to multi-user mode in a hands-off fashion, at least on a
Sun (I know it *is* possible on DEC's Ultrix, because their Operator Shell
program manages to bring the system down to single-user mode and not get
killed itself.  I assume there is kernel or ``init'' support for this
which I also assume is not present in SunOS.)

If your requirements include doing *all* filesystems, the above problem
precludes a complete, hands-off solution, but I know it *is* possible to
do "user" disks without much problem.  Several things are important, but
paramount are that you must unmount the filesystem (optimally including
the NFS clients, if any) to ensure it is quiescent, and run ``fsck -p'' on
the filesystem to make sure it's nice and clean before backing it up to
tape.  The trick to getting NFS clients to unmount the disk(s) is the
``showmount -a'' command which you can use to generate a command you can
issue via ``rsh'' on the client to unmount the filesystem.  If your users
are sloppy and forget to logoff, you need a sentinel to kill them so the
decks will be clear by the time you try to unmount the disks.  If they
have background jobs running, that's another problem.  At our site, those
jobs get priority, and the backup simply skips the disk(s) it cannot
unmount.

After the backup finishes, re-mounting the disks on the NFS clients is
only simple if all the information is in ``fstab'' so you can issue a
command of the form ``mount nfs_server:/filesystem_export_name'' without
needing to know the name of the mount point on the client or any mount
options.  If you use quotas, remember to turn them on again after mounting
the disk(s).  For completeness, you might want to check the quotas too.
(I have yet to understand why, but occasionally quotacheck actually
corrects a problem on our Sun-3 disk, even if the system had not crashed
since the last quotacheck.)

Regarding the ``root'' and ``usr'' filesystems, if your environment is
like ours, the only activity of any interest is user mail and system logs.
You can copy or ``tar'' those directories to one of the other "user"
disks, from which it will be backed up indirectly.  I backup the ``root''
and ``usr'' filesystems irregularly, generally after I've done some
substantial work to the system configuration.  Since ``usr'' is read-only,
that one's even easier to manage.




More information about the Comp.sys.sun mailing list