OK, several requirements here: I'll address them seperately 1) Report sucessful completion - The quick and dirty way to do that is to run your backup with a cron job. It will report the output from your backup. Alternately, in your script, you could check for the exit status right afterwards. ( EXITSTATUS=$?, then evaluate EXITSTATUS)
2) Size of the backups- In looking at the tar man page, I see therre is a -totals switch that says it will give you that information. If you have the option of backing up filesystems, as opposed to directories, you might want to look at using 'dump' instead of 'tar'. 3) Excluded files - tar will only exclude files your commandline tells it to. I assume you were meaning 'files not backed up'. This will be show on your error out put, whether on screen (or in email in the case of a cron job) or redirected, as was suggested in an earlier post. Hope this helps. I actually use tar over SSH to backup to a remote system. That way I have the files are out of harms way, high-speed accessiable and can see sizes easily. On Thursday 31 July 2003 15:54, AragonX wrote: > I've tried the -v option but my logs come out to be 5-10Mb in size > (depending on the server). It just lists the file names being backed up. > > <quote who="James Gibbon"> > > > "AragonX" wrote: > >> I'm using tar to do nightly backups. I would like to get some > >> useful information out of it to put in a log file. I would like > >> to know if the backup completed successfully, how big the backup > >> was and what files had to be excluded. Does anyone have any > >> ideas? > > > > You might use the 'v' option to list the files being archived, and > > redirect that, along with stderr, to the logfile. Something like > > > > tar cvf /dev/st0 ./dir_to_backup >/tmp/backuplog 2>&1 > > > > .. will work in bash or ksh. -- Leon Sonntag Systems Administrator -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list