From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e2cdb569eec43e82 X-Google-Attributes: gidfee84,public From: sclarry@epx.cis.umn.edu () Subject: Re: Need help with switching Run levels via crontab Date: 1996/12/16 Message-ID: <593s59$nqm@epx.cis.umn.edu>#1/1 X-Deja-AN: 204396474 references: organization: University of Minnesota newsgroups: comp.unix.osf.osf1 clos@ivory.trentu.ca wrote: : I would like to automate a nightly process using crontab whereby I shutdown to : single-user mode, umount -a, dump -0uf / & /usr, and "shutdown -r now" to return : system to run level 3. Is this sort of thing possible to automate? If so, I : could use some pointers on how I might set it up. : The main reason I want to do this is to ensure a clean tape backup of our UFS : filesystems. The DEC OSF/1 Sys Admin manual tells me the only way to produce a : "valid" backup of UFS files is to shutdown to single-user mode and unmount all : filesystems first. If there is a better way to run backups I'm all ears. : We are currently running DEC Unix 3.2c on an Alpha 2100 5/300. : -------------------------------------------------------------------------------- : Chris Los e-mail: clos@trentu.ca : Computing and Telecommunications, Trent University phone: 705-748-1588 : -------------------------------------------------------------------------------- Here's an overview of how I do it- >From crontab run a shutdown script which first creates a file called /autodump. Have a script called /opr/weekly_backup which contains the dump commands. The following lines are added to the /sbin/bcheckrc script to call the backup script and reboot- # do weekly file dumps here if /autodump exists [ -f /autodump ] && { /sbin/mount -u / /sbin/rm /autodump /sbin/sh /opr/weekly_backup /sbin/reboot } -- Larry Schafer -- Academic Computer Services -- St. Cloud State Univ. -- (320)255-4710 -- FAX (320)255-4778 -- larry@condor.stcloud.msus.edu