<?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: Good old rm in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903398#M96675</link>
    <description>"I restore prod data to say a mount point &lt;BR /&gt;/fpc/temp &lt;BR /&gt;When the data is restored it goes into /fpc/temp/fpc/temp I would like to move everything from /fpc/temp/fpc/temp to /fpc/temp and then rm the /fpc/temp/fpc" &lt;BR /&gt;&lt;BR /&gt;You restore there already don't you, all you need to do is to choose the "restore as" option to avoid duplicating the directory tree and having /fcp/temp/* instead of /fcp/temp/fcp/temp/*&lt;BR /&gt;</description>
    <pubDate>Fri, 24 Nov 2006 12:12:58 GMT</pubDate>
    <dc:creator>Christian Tremblay</dc:creator>
    <dc:date>2006-11-24T12:12:58Z</dc:date>
    <item>
      <title>Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903388#M96665</link>
      <description>Hello All &lt;BR /&gt;&lt;BR /&gt;Here is a breif description of the point. I have a demo system that I restore production data to. I use data protector 5.5 and when restoring I alway select restore to a new location (this is a must). So on demo I restore prod data to say a mount point &lt;BR /&gt;/fpc/temp &lt;BR /&gt;When the data is restored it goes into /fpc/temp/fpc/temp I would like to move everything from /fpc/temp/fpc/temp to /fpc/temp and then rm the /fpc/temp/fpc folder. Is this the best and safest way? &lt;BR /&gt;&lt;BR /&gt;cd /fpc/temp/fpc/temp&lt;BR /&gt;mv * /fpc/temp&lt;BR /&gt;cd /fpc/temp &amp;amp;&amp;amp; rm -rf fpc&lt;BR /&gt;&lt;BR /&gt;Thanks Everyone</description>
      <pubDate>Thu, 23 Nov 2006 11:07:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903388#M96665</guid>
      <dc:creator>P-Dicky</dc:creator>
      <dc:date>2006-11-23T11:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903389#M96666</link>
      <description>Hi,&lt;BR /&gt;how about:&lt;BR /&gt;cd  /fpc/temp/fpc/temp&lt;BR /&gt;# Create a tar of all the files with relative path&lt;BR /&gt;tar -cvf /fpc/tar.lis *&lt;BR /&gt;cd /fpc/temp&lt;BR /&gt;# Check the right was data backed up&lt;BR /&gt;tar -tvf /fpc/tar.lis&lt;BR /&gt;# Clear all the files&lt;BR /&gt;rm -r /fpc/temp/fpc&lt;BR /&gt;# Restore the files&lt;BR /&gt;tar -xvf /fpc/tar.lis&lt;BR /&gt; &lt;BR /&gt;Benefit : You still have all the data if anything did go wrong</description>
      <pubDate>Thu, 23 Nov 2006 11:13:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903389#M96666</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-11-23T11:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903390#M96667</link>
      <description>&amp;gt;&amp;gt; Is this the best and safest way?&lt;BR /&gt;&lt;BR /&gt;Safest and using -f in the next sentence are mutaly exclusive.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; cd /fpc/temp &amp;amp;&amp;amp; rm -rf fpc&lt;BR /&gt;&lt;BR /&gt;I would change that to tow commands:&lt;BR /&gt;&lt;BR /&gt;rmdir /fpc/temp/fpc/temp&lt;BR /&gt;rmdir /fpc/temp/fpc&lt;BR /&gt;&lt;BR /&gt;That would show you know what you are doing and give you a warning if there is a surprise.&lt;BR /&gt;&lt;BR /&gt;Just my opinion.&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:13:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903390#M96667</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-11-23T11:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903391#M96668</link>
      <description>to avoid these duplicates, check in DP, there is an restore option when you tell it where to restore.&lt;BR /&gt;&lt;BR /&gt;There are 2 choices "restore into" or "restore as" I don't remember which is which but choose the other one that you are using now and you will avoid duplicating the directory tree and having to fix it afterwards like you are trying to do.&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Nov 2006 11:14:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903391#M96668</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-23T11:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903392#M96669</link>
      <description>That mv is withing the same mountpoint no?&lt;BR /&gt;So you are not actually moving data, just directory entries. Pretty safe, and a tar seems a bit much, notably if the data could be re-restored if anything would go wrong.&lt;BR /&gt;&lt;BR /&gt;Actually i would probably solve it with just:&lt;BR /&gt;&lt;BR /&gt;ls /temp&lt;BR /&gt;mv /fpc/temp/fpc/temp /fpc/temp2&lt;BR /&gt;rmdir /fpc/temp/fpc&lt;BR /&gt;rmdir /fpc/temp&lt;BR /&gt;mv /fpc/temp2 /fpc/temp&lt;BR /&gt;&lt;BR /&gt;no wildcard to make you go wildly wrong,&lt;BR /&gt;no force&lt;BR /&gt;minimimal system resources used.&lt;BR /&gt;&lt;BR /&gt;Hein.</description>
      <pubDate>Thu, 23 Nov 2006 11:19:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903392#M96669</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-11-23T11:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903393#M96670</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;It would better if you fix the restore problem instead! Restore the files to the right location and avoid the risks of making an error and extra tasks...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Fri, 24 Nov 2006 00:06:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903393#M96670</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2006-11-24T00:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903394#M96671</link>
      <description>Exactly my point....</description>
      <pubDate>Fri, 24 Nov 2006 10:54:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903394#M96671</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-24T10:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903395#M96672</link>
      <description>&lt;BR /&gt;In the past someone used the over write and restored it to production instead of demo. Thus we are no longer allowed overwrite. You have to restore to an alternate location and move the data in. It is a demo system so if the script craps out it is no biggy &lt;BR /&gt;&lt;BR /&gt;I know, not my rule. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Nov 2006 11:12:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903395#M96672</guid>
      <dc:creator>P-Dicky</dc:creator>
      <dc:date>2006-11-24T11:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903396#M96673</link>
      <description>I am not talking about overwrite but choosing the right location for your restore&lt;BR /&gt;and the correct option to avoid duplicating the directory tree.&lt;BR /&gt;&lt;BR /&gt;You can create a directory say /tmp/restore&lt;BR /&gt;(with enough space there to hold your restored data)Then in DP you chose that dir as your destination.&lt;BR /&gt;&lt;BR /&gt;Let say you are restoring the file /home/joe/abc.txt, if you choose the "restore into" option in DP your file will be restored as /tmp/restore/home/joe/abc.txt&lt;BR /&gt;&lt;BR /&gt;If you choose the "restore as" option you will end up with /tmp/restore/abc.txt and will not have to fix it afterwards.&lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Nov 2006 11:44:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903396#M96673</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-24T11:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903397#M96674</link>
      <description>/fpc/temp is a mount point and Unix will not allow you to restore over it. So HP's fix is that I not check the mount point but all the dir's inside it. Some of them have 200 dir's that is alot of extra clicks. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Nov 2006 11:50:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903397#M96674</guid>
      <dc:creator>P-Dicky</dc:creator>
      <dc:date>2006-11-24T11:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Good old rm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903398#M96675</link>
      <description>"I restore prod data to say a mount point &lt;BR /&gt;/fpc/temp &lt;BR /&gt;When the data is restored it goes into /fpc/temp/fpc/temp I would like to move everything from /fpc/temp/fpc/temp to /fpc/temp and then rm the /fpc/temp/fpc" &lt;BR /&gt;&lt;BR /&gt;You restore there already don't you, all you need to do is to choose the "restore as" option to avoid duplicating the directory tree and having /fcp/temp/* instead of /fcp/temp/fcp/temp/*&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Nov 2006 12:12:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/good-old-rm/m-p/3903398#M96675</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-24T12:12:58Z</dc:date>
    </item>
  </channel>
</rss>

