<?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: renaming / as /root.bak while taking vxdump backup in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145354#M683243</link>
    <description>/usr/sbin/vxdump -0 -u -b 128 -B 200g -f ${TAPE}${i}.bak $i 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;${i}.bak  ---&amp;gt; this part does that.</description>
    <pubDate>Tue, 09 Dec 2008 08:58:29 GMT</pubDate>
    <dc:creator>kpatel786</dc:creator>
    <dc:date>2008-12-09T08:58:29Z</dc:date>
    <item>
      <title>renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145352#M683241</link>
      <description>Hi, I  have written a script which backs up all the file system is list as .bak with vxdump&lt;BR /&gt;for ex:-&lt;BR /&gt;&lt;BR /&gt;/var   --&amp;gt; /var.bak&lt;BR /&gt;/stand --&amp;gt; /stand.bak&lt;BR /&gt;and so on &lt;BR /&gt;&lt;BR /&gt;Below is my script:-&lt;BR /&gt;===&amp;gt;&lt;BR /&gt;set -vx&lt;BR /&gt;TAPE=/backup/networker_db_backup/os_app&lt;BR /&gt;HOST=`hostname`&lt;BR /&gt;FILESYSTEMS=`cat /test/filesystems_to_backup_V3`&lt;BR /&gt;echo "STARTING BACKUP OF $HOST `date`"&lt;BR /&gt;cd /&lt;BR /&gt;for i in $FILESYSTEMS&lt;BR /&gt;do&lt;BR /&gt;echo "STARTING BACKUP OF $i `date`"&lt;BR /&gt;/usr/sbin/vxdump -0 -u -b 128 -B 200g -f ${TAPE}${i}.bak $i 2&amp;gt;&amp;amp;1&lt;BR /&gt;        if [ $? -gt 0 ] ; then&lt;BR /&gt;echo "BACKUP FAILED FOR $i `date`"&lt;BR /&gt;        exit 1&lt;BR /&gt;        else&lt;BR /&gt;echo "BACKUP COMPLETED FOR $i `date`"&lt;BR /&gt;        fi&lt;BR /&gt;done&lt;BR /&gt;echo "END OF BACKUP SCRIPT"&lt;BR /&gt;====&amp;gt;&lt;BR /&gt;&lt;BR /&gt;The problem is it backs / as:&lt;BR /&gt;/ --&amp;gt; .bak&lt;BR /&gt;and  want it to be backed as below:&lt;BR /&gt;/ --&amp;gt; /root.bak&lt;BR /&gt;&lt;BR /&gt;if I repalce the / with root in the file list it won't back the / filesytem. Kindly assist with your inputs.&lt;BR /&gt;&lt;BR /&gt;Thanking you in advance&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Dec 2008 08:46:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145352#M683241</guid>
      <dc:creator>kpatel786</dc:creator>
      <dc:date>2008-12-09T08:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145353#M683242</link>
      <description>How are you getting it to do /var.bak and /stand.bak?</description>
      <pubDate>Tue, 09 Dec 2008 08:56:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145353#M683242</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-09T08:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145354#M683243</link>
      <description>/usr/sbin/vxdump -0 -u -b 128 -B 200g -f ${TAPE}${i}.bak $i 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;${i}.bak  ---&amp;gt; this part does that.</description>
      <pubDate>Tue, 09 Dec 2008 08:58:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145354#M683243</guid>
      <dc:creator>kpatel786</dc:creator>
      <dc:date>2008-12-09T08:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145355#M683244</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try this:&lt;BR /&gt;...&lt;BR /&gt;echo "STARTING BACKUP OF $i `date`"&lt;BR /&gt;j=${i#/}&lt;BR /&gt;/usr/sbin/vxdump -0 -u -b 128 -B 200g -f ${TAPE} /${j:-root}}.bak $i 2&amp;gt;&amp;amp;1&lt;BR /&gt;if [ $? -gt 0 ] ; then&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Tue, 09 Dec 2008 10:12:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145355#M683244</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2008-12-09T10:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145356#M683245</link>
      <description>Hi Peter,&lt;BR /&gt;&lt;BR /&gt;I pressume this will only back / area. But what I intend to do is back up all the files in $FILESYSTEMS in for loop.&lt;BR /&gt;Currently it is doing so for all the filesystem however it is backing the / as .bak which I need to do as root.bak along with all the other filesystems.&lt;BR /&gt;&lt;BR /&gt;Hope you understood.</description>
      <pubDate>Tue, 09 Dec 2008 11:03:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145356#M683245</guid>
      <dc:creator>kpatel786</dc:creator>
      <dc:date>2008-12-09T11:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145357#M683246</link>
      <description>&amp;gt;I presume this will only back / area.&lt;BR /&gt;&lt;BR /&gt;Peter's logic will remove the "/" from the name, then if there is nothing left, it will insert "root".</description>
      <pubDate>Tue, 09 Dec 2008 11:45:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145357#M683246</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-09T11:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145358#M683247</link>
      <description>To be frank I have not understood the logic. If this logic is backing all the filesystem along with / renaming then I have found GOD.&lt;BR /&gt;&lt;BR /&gt;If possible kindly explain the logic.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Tue, 09 Dec 2008 12:57:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145358#M683247</guid>
      <dc:creator>kpatel786</dc:creator>
      <dc:date>2008-12-09T12:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145359#M683248</link>
      <description>&lt;!--!*#--&gt;hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; To be frank I have not understood the logic. &lt;BR /&gt;&lt;BR /&gt;To see what Peter has done (to solve your problem), run this test script:&lt;BR /&gt;&lt;BR /&gt;# cat ./seehow&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;for i in / /root /tmp /var&lt;BR /&gt;do&lt;BR /&gt;    j=${i#/}&lt;BR /&gt;    echo /usr/sbin/vxdump -0 -u -b 128 -B 200g -f ${TAPE} /${j:-root}.bak $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;The statement:&lt;BR /&gt;&lt;BR /&gt;j=${i#/}&lt;BR /&gt;&lt;BR /&gt;...examines the 'i' parameter and if it begins with the '/' character, then that character is dropped and the remainder of the character string is assigned to 'j'.  Otherwise, the value of 'i' is simply assigned to 'j'.&lt;BR /&gt;&lt;BR /&gt;The experssion:&lt;BR /&gt;&lt;BR /&gt;/${j:-root}.bak &lt;BR /&gt;&lt;BR /&gt;...is of the form:&lt;BR /&gt;&lt;BR /&gt;${parameter:-word}&lt;BR /&gt;&lt;BR /&gt;...which says, if the parameter is set and is nonnull, substitute its value; otherwise, substitute word.  Hence, if 'j' is set and not null, use the value of 'j'; otherwise, substitute the string "root".&lt;BR /&gt;&lt;BR /&gt;These techniques are described in the 'sh-posix' manpages under "Parameter Substitution":&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3921-60631/sh-posix.1.html" target="_blank"&gt;http://docs.hp.com/en/B3921-60631/sh-posix.1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Dec 2008 13:28:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145359#M683248</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-12-09T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145360#M683249</link>
      <description>Thank you all for your reply have got the required output.&lt;BR /&gt;&lt;BR /&gt;Special thanks to Peter and James.</description>
      <pubDate>Tue, 09 Dec 2008 14:05:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145360#M683249</guid>
      <dc:creator>kpatel786</dc:creator>
      <dc:date>2008-12-09T14:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145361#M683250</link>
      <description>.</description>
      <pubDate>Tue, 09 Dec 2008 14:05:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145361#M683250</guid>
      <dc:creator>kpatel786</dc:creator>
      <dc:date>2008-12-09T14:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: renaming / as /root.bak while taking vxdump backup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145362#M683251</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;thanks to Dennis + James for the excellent explanation of the construct I used.&lt;BR /&gt;I really try not to leave questions to my work uncommented, but had to leave unexpectedly.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 10 Dec 2008 11:22:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-as-root-bak-while-taking-vxdump-backup/m-p/5145362#M683251</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2008-12-10T11:22:04Z</dc:date>
    </item>
  </channel>
</rss>

