<?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: Copy filesystems with tar in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584890#M744</link>
    <description>You could it with dump, tar, or cpio. The message you got with tar was just a warning.&lt;BR /&gt;&lt;BR /&gt;To copy with dump:&lt;BR /&gt;The only obstacle is the that it will include the full path in the restore. Here's an example assuming copying of /home to /home2 &lt;BR /&gt;&lt;BR /&gt;dump -0 -f - /home | (cd /home2; restore -x -f -) &lt;BR /&gt;&lt;BR /&gt;This works well, except that the home directory will appear under /home2 and then you just need to use move to rename it to where it should be. &lt;BR /&gt;&lt;BR /&gt;CPIO:  Example where permissions are preserved:&lt;BR /&gt;&lt;BR /&gt;find . -depth -print | &lt;BR /&gt;cpio -plvdmu  /outputdest&lt;BR /&gt;&lt;BR /&gt;It will copy the directory you are in to outputdest and preserve everything.&lt;BR /&gt;&lt;BR /&gt;For tar, your command is fine, except that I'd add  a -p on the untar for preserve:&lt;BR /&gt;&lt;BR /&gt;tar -cf - . | (cd targetdir; tar -xpf -) &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 26 Sep 2001 13:06:40 GMT</pubDate>
    <dc:creator>Bernie Vande Griend</dc:creator>
    <dc:date>2001-09-26T13:06:40Z</dc:date>
    <item>
      <title>Copy filesystems with tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584888#M742</link>
      <description>Hi, I need to copy one filesystem to other filesystem (backup but not on tape) with tar command on linux red hat 7.1. And I  used this command :&lt;BR /&gt;cd sourcedir; tar -cf - . | (cd targetdir; tar -xf -)&lt;BR /&gt;&lt;BR /&gt;But, I received this error with some directories:&lt;BR /&gt;time stamp 2007-02-04 13:56:12 is 175265582 s in the future.&lt;BR /&gt;&lt;BR /&gt;I need a tar parameter or another command (dump, cpio) that ignore dates and time when its copying files.&lt;BR /&gt;&lt;BR /&gt;I used --atime-preserve tar parameter but it didn't work or I don't know how to use it.&lt;BR /&gt;&lt;BR /&gt;I will appreciate any help, thank you.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2001 20:52:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584888#M742</guid>
      <dc:creator>Alfonso_4</dc:creator>
      <dc:date>2001-09-25T20:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Copy filesystems with tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584889#M743</link>
      <description>As far as I can tell, the message from tar is merely a warning. Add "2&amp;gt;/dev/null" to send it to the bit-bucket.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2001 23:52:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584889#M743</guid>
      <dc:creator>Charles Slivkoff</dc:creator>
      <dc:date>2001-09-25T23:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Copy filesystems with tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584890#M744</link>
      <description>You could it with dump, tar, or cpio. The message you got with tar was just a warning.&lt;BR /&gt;&lt;BR /&gt;To copy with dump:&lt;BR /&gt;The only obstacle is the that it will include the full path in the restore. Here's an example assuming copying of /home to /home2 &lt;BR /&gt;&lt;BR /&gt;dump -0 -f - /home | (cd /home2; restore -x -f -) &lt;BR /&gt;&lt;BR /&gt;This works well, except that the home directory will appear under /home2 and then you just need to use move to rename it to where it should be. &lt;BR /&gt;&lt;BR /&gt;CPIO:  Example where permissions are preserved:&lt;BR /&gt;&lt;BR /&gt;find . -depth -print | &lt;BR /&gt;cpio -plvdmu  /outputdest&lt;BR /&gt;&lt;BR /&gt;It will copy the directory you are in to outputdest and preserve everything.&lt;BR /&gt;&lt;BR /&gt;For tar, your command is fine, except that I'd add  a -p on the untar for preserve:&lt;BR /&gt;&lt;BR /&gt;tar -cf - . | (cd targetdir; tar -xpf -) &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2001 13:06:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584890#M744</guid>
      <dc:creator>Bernie Vande Griend</dc:creator>
      <dc:date>2001-09-26T13:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Copy filesystems with tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584891#M745</link>
      <description>tar and cpio are designed to copy files, not filesystems.  This is an important distinction here.&lt;BR /&gt;&lt;BR /&gt;If you want to make backups of filesystems, use dump, which is designed exactly to solve this problem.&lt;BR /&gt;&lt;BR /&gt;In your case, you might even consider just using dd to make an exact image of the filesystem.  It can't do incremental backups, but it doesn't sound like that's what you're after.</description>
      <pubDate>Wed, 26 Sep 2001 13:15:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584891#M745</guid>
      <dc:creator>Chris Calabrese</dc:creator>
      <dc:date>2001-09-26T13:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Copy filesystems with tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584892#M746</link>
      <description>I have attached a script I use to move directories into&lt;BR /&gt;filesystems.   As is the script requires the destination&lt;BR /&gt;be empty.  You will likely want to change this.&lt;BR /&gt;The extract is verbose, and preserves permissions.&lt;BR /&gt;&lt;BR /&gt;While the timestamp in the future message is just a &lt;BR /&gt;warning, it is a symptom of a possibly serious  problem.&lt;BR /&gt;If the problem persists and applies to different files&lt;BR /&gt;you have a time syncronization problem.&lt;BR /&gt;&lt;BR /&gt;If your system is ever compromized, forget the &lt;BR /&gt;timestamps in the log files.   Setup xntpd, and&lt;BR /&gt;syncronize all the system that can write to this&lt;BR /&gt;file system.</description>
      <pubDate>Thu, 27 Sep 2001 00:13:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584892#M746</guid>
      <dc:creator>Bill Thorsteinson</dc:creator>
      <dc:date>2001-09-27T00:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Copy filesystems with tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584893#M747</link>
      <description>Hi, thanks for your help. Now my problem is that Im trying to use dump to copy a filesystem shared with NFS to a local filesystem,  when I type "dump -0 -f - source | (cd  destination; restore -x -f -)", this is the error message:&lt;BR /&gt;&lt;BR /&gt; "No such file or directory while opening filesystem&lt;BR /&gt;&lt;BR /&gt;restore: Tape is not a dump tape".&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 27 Sep 2001 18:53:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584893#M747</guid>
      <dc:creator>Alfonso_4</dc:creator>
      <dc:date>2001-09-27T18:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Copy filesystems with tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584894#M748</link>
      <description>Oops, don't believe dump can do that.  The man page for dump says:&lt;BR /&gt;"It might be considered a bug that this version of dump can only handle ext2 filesystems.  Specifically, it does not work with FAT filesystems."&lt;BR /&gt;&lt;BR /&gt;Since the filesystem you are trying to dump is remote (NFS), this version of dump can't handle it.  &lt;BR /&gt;You're going to have to use cpio, tar, or dd if you want to do it locally.</description>
      <pubDate>Thu, 27 Sep 2001 19:38:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-filesystems-with-tar/m-p/2584894#M748</guid>
      <dc:creator>Bernie Vande Griend</dc:creator>
      <dc:date>2001-09-27T19:38:34Z</dc:date>
    </item>
  </channel>
</rss>

