<?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: bkup script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274786#M179301</link>
    <description>Hello Mark,&lt;BR /&gt;Thank you for help, you give me the solution; you are a life saver. I got it work now :o). &lt;BR /&gt;Thanks again&lt;BR /&gt;Jen</description>
    <pubDate>Thu, 13 May 2004 18:05:14 GMT</pubDate>
    <dc:creator>Jennifer Lam</dc:creator>
    <dc:date>2004-05-13T18:05:14Z</dc:date>
    <item>
      <title>bkup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274784#M179299</link>
      <description>Hello All,&lt;BR /&gt;I have a working backup script just access for only one system when I do cront backup. Would you help me to have a variable set in the script that can work / apply for other system when I have a variable defined on crontab command! Thank you&lt;BR /&gt; &lt;BR /&gt; This is a cront bkup command:&lt;BR /&gt; Ex.  0 0 * * 6  /70gig/ASI/bkscript_ravenp3 (I would like to have the ravenp3 (is a hostname) to be a variable that can apply for any system hostname when I run the script)&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; This is the script&lt;BR /&gt;  &lt;BR /&gt; #! /bin/ksh&lt;BR /&gt;&lt;BR /&gt; # File: /70gig/ASI/bkscript_ravenp3&lt;BR /&gt; # Purpose: save all files &amp;amp; directories under directory /usr/ferrari, /usr/local/si, &lt;BR /&gt; #          /usr/local/si_log, /usr/local/bin&lt;BR /&gt;&lt;BR /&gt; DATE="`date`"&lt;BR /&gt; #SYS_NAME="ravenp3"&lt;BR /&gt; DESTFILE="/70gig/ASI/ravenp3/ravenp3.bk.tar"&lt;BR /&gt; ERROR="/70gig/ASI/error.logs"&lt;BR /&gt; MOUNT1="/backup_si"&lt;BR /&gt; MOUNT2="/backup_ferrari"&lt;BR /&gt; BKLOGS="/70gig/ASI/bk.logs"&lt;BR /&gt;&lt;BR /&gt; # check error.log file for network no connection.&lt;BR /&gt;&lt;BR /&gt; if &lt;BR /&gt; ping ravenp3 -n 3 | grep '3 packets transmitted, 3 packets received, 0% packet loss'&lt;BR /&gt;         then &lt;BR /&gt;                 echo "$DATE; the system is connecting \n " &amp;gt;&amp;gt; $ERROR&lt;BR /&gt;         else&lt;BR /&gt;                 echo "$DATE; the system is NO connecting \n " &amp;gt;&amp;gt; $ERROR&lt;BR /&gt;                 exit    &lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; # check the system is mounting to the previuos system, so it  needs to umount the previous syst before&lt;BR /&gt; # mount to the system. &lt;BR /&gt;&lt;BR /&gt; if bdf | grep $MOUNT1&lt;BR /&gt;    bdf | grep $MOUNT2&lt;BR /&gt;         then &lt;BR /&gt;    echo "$DATE; filesystem already mount to the previous system \n " &amp;gt;&amp;gt; $ERROR&lt;BR /&gt;                 umount $MOUNT1 &lt;BR /&gt;                 umount $MOUNT2&lt;BR /&gt;    echo "$DATE filesystem already Un-mount \n " &amp;gt;&amp;gt; $ERROR&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt; # mounting nft then tar &amp;amp; gzip the bkup files, finaly umount nfs&lt;BR /&gt;&lt;BR /&gt; mount -F nfs ravenp3:/usr/local $MOUNT1&lt;BR /&gt; mount -F nfs ravenp3:/usr/ferrari $MOUNT2&lt;BR /&gt; tar -cvf $DESTFILE $MOUNT1/si $MOUNT1/si_logs $MOUNT1/bin $MOUNT2&lt;BR /&gt; /usr/contrib/bin/gzip -f $DESTFILE&lt;BR /&gt; umount $MOUNT1 &lt;BR /&gt; umount $MOUNT2&lt;BR /&gt;&lt;BR /&gt; echo "This is a bkscrip for ravenp3 on `date` \n " &amp;gt;&amp;gt; $BKLOGS</description>
      <pubDate>Wed, 12 May 2004 22:40:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274784#M179299</guid>
      <dc:creator>Jennifer Lam</dc:creator>
      <dc:date>2004-05-12T22:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: bkup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274785#M179300</link>
      <description>I might be being a bit simple here but it looks like you are backing up by NFS mounting the required filesystems from a machine and then using tar.&lt;BR /&gt; &lt;BR /&gt;If this is all you want, then the solution to your problem is really simple.&lt;BR /&gt; &lt;BR /&gt;Replace the string "ravenp3" with "$1" thougout the script.  Then call the scripts as &lt;BR /&gt;"bkscript_ravenp3 &lt;HOSTNAME&gt;".  If this does do what you need then it might be worth renaming the script to just "bkscript"&lt;/HOSTNAME&gt;</description>
      <pubDate>Thu, 13 May 2004 01:14:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274785#M179300</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-05-13T01:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: bkup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274786#M179301</link>
      <description>Hello Mark,&lt;BR /&gt;Thank you for help, you give me the solution; you are a life saver. I got it work now :o). &lt;BR /&gt;Thanks again&lt;BR /&gt;Jen</description>
      <pubDate>Thu, 13 May 2004 18:05:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274786#M179301</guid>
      <dc:creator>Jennifer Lam</dc:creator>
      <dc:date>2004-05-13T18:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: bkup script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274787#M179302</link>
      <description>Great answer Mark.  Sounds like you are all set Jennifer, but thought I'd throw in my 2 cents.  You asked about a variable to use for your hostname.  You could use $(uname -n) to print the machine's hostname.  This would replace ravenp3 (your hostname that's hardcoded in your script) with the hostname that is being backed up.&lt;BR /&gt;&lt;BR /&gt;Any rate, glad you got your script working.</description>
      <pubDate>Thu, 13 May 2004 21:52:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bkup-script/m-p/3274787#M179302</guid>
      <dc:creator>Dani Seely</dc:creator>
      <dc:date>2004-05-13T21:52:26Z</dc:date>
    </item>
  </channel>
</rss>

