<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: backup script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567005#M227540</link>
    <description>Put &lt;BR /&gt;&lt;BR /&gt;set -x&lt;BR /&gt;&lt;BR /&gt;at the beginning&lt;BR /&gt;&lt;BR /&gt;and then redirect the errors and STDOUT to a log file:&lt;BR /&gt;&lt;BR /&gt;scriptname 2&amp;gt;&amp;amp;1 &amp;gt; logfilename&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
    <pubDate>Mon, 20 Jun 2005 09:53:48 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2005-06-20T09:53:48Z</dc:date>
    <item>
      <title>backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567003#M227538</link>
      <description>I have made an online backup script with DD cmd because my database supports raw device.&lt;BR /&gt;backup is going through but my worry is i cannot see the execution of it. i mean i want to make a logfile so that i can keep track of of each and every steps executed in my scripts. &lt;BR /&gt;&lt;BR /&gt;Can anyone help me in this.&lt;BR /&gt;I will attach my smaple script with it.&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jun 2005 09:42:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567003#M227538</guid>
      <dc:creator>musaddaq_2</dc:creator>
      <dc:date>2005-06-20T09:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567004#M227539</link>
      <description>It appears that you already have the echoes in place so all you need to do is redirect stdout and stderr. You can do that like this:&lt;BR /&gt;&lt;BR /&gt;mybackup.sh &amp;gt; /var/tmp/backup.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;or add these 2 lines at the top of your script&lt;BR /&gt;&lt;BR /&gt;exec 1&amp;gt;/var/tmp/backup.log&lt;BR /&gt;exec 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;You could decide to redirect stderr to a separate file as well.&lt;BR /&gt;&lt;BR /&gt;I should also tell you that relying upon dd for you backups is not something that I would do. There is simply no error recovery nor error checking. You should really look at something like rman or better still DataProtector for this task.</description>
      <pubDate>Mon, 20 Jun 2005 09:53:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567004#M227539</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-06-20T09:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567005#M227540</link>
      <description>Put &lt;BR /&gt;&lt;BR /&gt;set -x&lt;BR /&gt;&lt;BR /&gt;at the beginning&lt;BR /&gt;&lt;BR /&gt;and then redirect the errors and STDOUT to a log file:&lt;BR /&gt;&lt;BR /&gt;scriptname 2&amp;gt;&amp;amp;1 &amp;gt; logfilename&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Mon, 20 Jun 2005 09:53:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567005#M227540</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-20T09:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567006#M227541</link>
      <description>Hello Mr. Stephenson and brown.&lt;BR /&gt;Thanks for your suggestions. It is making a backup log for me. &lt;BR /&gt;&lt;BR /&gt;Thanks once again&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jun 2005 10:53:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567006#M227541</guid>
      <dc:creator>musaddaq_2</dc:creator>
      <dc:date>2005-06-20T10:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567007#M227542</link>
      <description>Hi Musaddag,&lt;BR /&gt;&lt;BR /&gt;Since you are using Oracle 9i, please consider using Oracle RMAN as backup and recovery tool. It's handy, FULLY supported by Oracle, uses less space and last but not least very free (gratis/gratuis).&lt;BR /&gt;With RMAN you can copy/clone database very easy and create online backups.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Renarios</description>
      <pubDate>Mon, 20 Jun 2005 14:38:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567007#M227542</guid>
      <dc:creator>renarios</dc:creator>
      <dc:date>2005-06-20T14:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567008#M227543</link>
      <description>Another way to get the log and all the cmds in the script it to&lt;BR /&gt;&lt;BR /&gt;backup | tee -a backup.log  &amp;gt; output.log&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jun 2005 14:47:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567008#M227543</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2005-06-20T14:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567009#M227544</link>
      <description>The "tee" command will only capture stdin so the above command as written will miss stderr (and probably the most significant messages when things go wrong). The solution is to combine stderr and stdout BEFORE sending the output to "tee".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mybackup.sh 2&amp;gt;&amp;amp;1 | tee /var/tmp/backup.log&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jun 2005 15:01:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567009#M227544</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-06-20T15:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: backup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567010#M227545</link>
      <description>Musaddaq,&lt;BR /&gt;&lt;BR /&gt;Your script does not include the shell in which its going to execute. If its the Korn shell and you need to turn on debugging then put the following lines at the top of your script:&lt;BR /&gt;&lt;BR /&gt;=============================================&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;set -x&lt;BR /&gt;=============================================&lt;BR /&gt;&lt;BR /&gt;After adding these lines to the top of the script schedule it through cron as follows:&lt;BR /&gt;&lt;BR /&gt;mybackup.sh 2&amp;gt;&amp;amp;1 /var/tmp/mybackup.log&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
      <pubDate>Tue, 21 Jun 2005 11:35:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backup-script/m-p/3567010#M227545</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-06-21T11:35:42Z</dc:date>
    </item>
  </channel>
</rss>

