help required in logging tar command output

karlp at ourldsfamily.com karlp at ourldsfamily.com
Fri Mar 9 05:01:21 UTC 2007


On Wed, March 7, 2007 7:03 am, drumil narayan wrote:
> Thanks Rick,
>
> it works fine..
> if I wnat to combine into one comamnd then what
> changes I should make!

None. Just put it in a script and call the script from cron. That way, you can
also log things differently from within the script, such as capturing certain
details and emailing them.

>
> Thanks!
> Drumil
>
> --- Rick Stevens <rstevens at vitalstream.com> wrote:
>
>> On Fri, 2007-03-02 at 12:53 +0000, drumil narayan
>> wrote:
>> > Hello,
>> >
>> > am trying to backup some directories using tar and
>> > furhter have to prepare the log file of it.
>> >
>> > this is going to be job which will run as
>> background
>> > process
>> >
>> > am trying this
>> >
>> > tar -cvf Disk1.tar /home/Oracle/Disk1/* >
>> Disk1.log
>> > &nohup
>> > gzip Disk1.tar
>> >
>> > its not preparing gzip Disk1.tar
>> > can sombody correct me please
>>
>> It's easier if you create a script,
>> /usr/local/bin/backup:
>>
>> 	#!/bin/bash
>> 	cd /some/working/directory
>> 	tar cvf Disk1.tar /home/Oracle/Disk1/* >Disk1.log
>> 2>&1
>> 	gzip Disk1.tar
>>
>> Then "chmod 755 /usr/local/bin/backup".  Run that
>> script via:
>>
>> 	# nohup /usr/local/bin/backup &
>>
>> That way you can even crontab it should you wish.
>>
>> >
>> > thanks..drumil
>> >
>> >
>> >
>> >
>>
> __________________________________________________________
>> > Yahoo! India Answers: Share what you know. Learn
>> something new
>> > http://in.answers.yahoo.com/
>> >
>> > _______________________________________________
>> > Redhat-install-list mailing list
>> > Redhat-install-list at redhat.com
>> >
>>
> https://www.redhat.com/mailman/listinfo/redhat-install-list
>> > To Unsubscribe Go To ABOVE URL or send a message
>> to:
>> > redhat-install-list-request at redhat.com
>> > Subject: unsubscribe
>>
> ----------------------------------------------------------------------
>> - Rick Stevens, Principal Engineer
>> rstevens at vitalstream.com -
>> - VitalStream, Inc.
>> http://www.vitalstream.com -
>> -
>>                 -
>> -   Never test for an error condition you don't know
>> how to handle.  -
>>
> ----------------------------------------------------------------------
>>
>> _______________________________________________
>> Redhat-install-list mailing list
>> Redhat-install-list at redhat.com
>>
> https://www.redhat.com/mailman/listinfo/redhat-install-list
>> To Unsubscribe Go To ABOVE URL or send a message to:
>> redhat-install-list-request at redhat.com
>> Subject: unsubscribe
>>
>
>
>
>
> __________________________________________________________
> Yahoo! India Answers: Share what you know. Learn something new
> http://in.answers.yahoo.com/
>
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request at redhat.com
> Subject: unsubscribe
>


-- 
karl
     _/  _/      _/      _/_/_/       ____________   __o
    _/ _/       _/      _/    _/     ____________  _-\<._
   _/_/        _/      _/_/_/                     (_)/ (_)
  _/ _/       _/      _/           ......................
 _/   _/ arl _/_/_/  _/ earson    KarlP at ourldsfamily.com
---
Senior Consulting Sys/DB Analyst
http://consulting.ourldsfamily.com
---
 My Thoughts on Terrorism In America right after 9/11/2001:
 http://www.ourldsfamily.com/wtc.shtml
---
 The world is a dangerous place to live... not because of
 the people who are evil, but because of the people who
 don't do anything about it.
 - Albert Einstein
---




More information about the Redhat-install-list mailing list