<?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: informix backup script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933239#M762497</link>
    <description>George,&lt;BR /&gt;&lt;BR /&gt;you should really check the return code from the ontape command, in order to see if the backup worked.&lt;BR /&gt;Because your ontape command is in the middle of a series of pipes, its hard to do this without checking the online log file using onstat -m.  Grep -i 'aborted'.&lt;BR /&gt;&lt;BR /&gt;Anyway, just add one of the mv commands specified above to the end of your script after the ontape line.&lt;BR /&gt;&lt;BR /&gt;Also do a 2&amp;gt;&amp;amp;1 on the end of the ontape line, to capture any stderr messages.&lt;BR /&gt;&lt;BR /&gt;You should also rename /tmp/ontapelogfile to have a datetimestamp on the end, giving historical record of the backup success/failure status.&lt;BR /&gt;Don't store the backup messages in /tmp in case of cleardowns, you would lose them.&lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;</description>
    <pubDate>Fri, 26 Jan 2007 05:11:28 GMT</pubDate>
    <dc:creator>Steve Lewis</dc:creator>
    <dc:date>2007-01-26T05:11:28Z</dc:date>
    <item>
      <title>informix backup script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933234#M762492</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I'm backing up my informix db to disk using the following script.&lt;BR /&gt;&lt;BR /&gt;Since the backup file name has a static name in the onconfig file is there any way add a bit onto this script that will rename the backup file to the current date after the backup is finished?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;&lt;BR /&gt;George&lt;BR /&gt;&lt;BR /&gt;#################################################################### &lt;BR /&gt;# script to backup Informix to disk &lt;BR /&gt;####################################################################  &lt;BR /&gt;INFORMIXDIR=/opt/informix&lt;BR /&gt;export INFORMIXDIR &lt;BR /&gt;PATH=$INFORMIXDIR/bin:$PATH &lt;BR /&gt;export PATH &lt;BR /&gt;ONCONFIG=onconfig.svr2 &lt;BR /&gt;export ONCONFIG &lt;BR /&gt;INFORMIXSERVER=svr2&lt;BR /&gt;#svr2 = pbs database&lt;BR /&gt;export INFORMIXSERVER &lt;BR /&gt;## Echo message to log file &lt;BR /&gt;echo "Archive Informix Online for $INFORMIXSERVER"&lt;BR /&gt;LEVEL=0 &lt;BR /&gt;echo "$LEVEL"| ontape -s | head -100 &amp;gt; /tmp/ontapelogfile</description>
      <pubDate>Fri, 26 Jan 2007 03:20:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933234#M762492</guid>
      <dc:creator>George_Dodds</dc:creator>
      <dc:date>2007-01-26T03:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: informix backup script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933235#M762493</link>
      <description>Here's the device entry in the onconfig file &lt;BR /&gt;&lt;BR /&gt;TAPEDEV         /infbackup/svr2backup.bak</description>
      <pubDate>Fri, 26 Jan 2007 03:27:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933235#M762493</guid>
      <dc:creator>George_Dodds</dc:creator>
      <dc:date>2007-01-26T03:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: informix backup script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933236#M762494</link>
      <description>George,&lt;BR /&gt;how about:&lt;BR /&gt;mv /infbackup/svr2backup.bak /infbackup/`date +%Y%m%d%H`.bck&lt;BR /&gt;&lt;BR /&gt;will result in 2007012608 (YYYYMMDDHH) format. I included the Hour, just in case you generate two backup files on the same day.</description>
      <pubDate>Fri, 26 Jan 2007 03:41:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933236#M762494</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-26T03:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: informix backup script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933237#M762495</link>
      <description>Was not sure if the next step would need some sort of signal to let it know the backup had finished or not before it renamed the file.</description>
      <pubDate>Fri, 26 Jan 2007 04:03:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933237#M762495</guid>
      <dc:creator>George_Dodds</dc:creator>
      <dc:date>2007-01-26T04:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: informix backup script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933238#M762496</link>
      <description>George,&lt;BR /&gt;although this is an old doc, you may find it useful :&lt;BR /&gt;&lt;A href="http://www.oreilly.com/catalog/unixbr/chapter/ch14.html#83088" target="_blank"&gt;http://www.oreilly.com/catalog/unixbr/chapter/ch14.html#83088&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or for the whole chapter:&lt;BR /&gt;&lt;A href="http://www.oreilly.com/catalog/unixbr/chapter/ch14.html" target="_blank"&gt;http://www.oreilly.com/catalog/unixbr/chapter/ch14.html&lt;/A&gt;</description>
      <pubDate>Fri, 26 Jan 2007 04:21:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933238#M762496</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-26T04:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: informix backup script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933239#M762497</link>
      <description>George,&lt;BR /&gt;&lt;BR /&gt;you should really check the return code from the ontape command, in order to see if the backup worked.&lt;BR /&gt;Because your ontape command is in the middle of a series of pipes, its hard to do this without checking the online log file using onstat -m.  Grep -i 'aborted'.&lt;BR /&gt;&lt;BR /&gt;Anyway, just add one of the mv commands specified above to the end of your script after the ontape line.&lt;BR /&gt;&lt;BR /&gt;Also do a 2&amp;gt;&amp;amp;1 on the end of the ontape line, to capture any stderr messages.&lt;BR /&gt;&lt;BR /&gt;You should also rename /tmp/ontapelogfile to have a datetimestamp on the end, giving historical record of the backup success/failure status.&lt;BR /&gt;Don't store the backup messages in /tmp in case of cleardowns, you would lose them.&lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jan 2007 05:11:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933239#M762497</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2007-01-26T05:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: informix backup script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933240#M762498</link>
      <description>&amp;gt; Was not sure if the next step would need some&lt;BR /&gt;&amp;gt; sort of signal to let it know the backup had &lt;BR /&gt;&amp;gt; finished or not before it renamed the file.&lt;BR /&gt;&lt;BR /&gt;If the commands in the script are executed syncronous the execution of the next command &lt;BR /&gt;will only take place after the one before has finished execution.&lt;BR /&gt;However, if a predecessor process backgrounded the execution of pending commands will continue and not be blocked until the former's termination.&lt;BR /&gt;In such a case you can make use of the wait command.&lt;BR /&gt;Without arguments it will wait till all backgrounded process have finished.&lt;BR /&gt;But you can pass it the PID of a specific backgrounded process that the next command in the script should wait for.&lt;BR /&gt;The PID of the last backgrounded process is stored in the shell special variable $! for instance.&lt;BR /&gt;So you could add &lt;BR /&gt;&lt;BR /&gt;wait $!&lt;BR /&gt;&lt;BR /&gt;or better, if you have several backgrounded processes, store their PIDs in variables or an array immediately after they were backgrounded for later reference in various wait calls.&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jan 2007 05:52:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/informix-backup-script-help/m-p/3933240#M762498</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-01-26T05:52:40Z</dc:date>
    </item>
  </channel>
</rss>

