Professional Web Applications Themes

How to dupe a file system? - Linux / Unix Administration

I want to dupe an entire drive. Could someone advise me as to which command is best suited for this task? Please include the switches I need to make an exact duplicate of a file system. TIA, jim -- _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Everything should be made as simple as possible, but not simpler. _/ -- Albert Einstein _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/...

  1. #1

    Default How to dupe a file system?

    I want to dupe an entire drive. Could someone advise me as to which command
    is best suited for this task? Please include the switches I need to make an
    exact duplicate of a file system.

    TIA,
    jim
    --
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    _/ Everything should be made as simple as possible, but not simpler.
    _/ -- Albert Einstein
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    Jim Guest

  2. #2

    Default Re: How to dupe a file system?

    On Thu, 04 Aug 2005 19:25:26 GMT, Jim Showalter <net> wrote: 

    What type of system? What type of filesystem? What are you _actually_
    trying to accomplish, and on what kind of computer and OS?
    Dave Guest

  3. #3

    Default Re: How to dupe a file system?

    On Thu, 04 Aug 2005 19:29:48 +0000, Dave Hinz wrote:
     

    Sorry, just didn't think those details were relevent as long as we're
    talking Unix.

    System: Home desktop PC

    File System: ReiserFS

    Object: migrate to a larger disk

    Computer: Intel (well, actually an AMD Sempron)

    Operating System: SuSE Linux


    jim
    --
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    _/ Everything should be made as simple as possible, but not simpler.
    _/ -- Albert Einstein
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    Jim Guest

  4. #4

    Default Re: How to dupe a file system?

    On Thu, 04 Aug 2005 19:57:38 GMT, Jim Showalter <net> wrote: 
    >
    > Sorry, just didn't think those details were relevent as long as we're
    > talking Unix.[/ref]

    Well then; man ufsdump.

    Dave Guest

  5. #5

    Default Re: How to dupe a file system?

    On Thu, 04 Aug 2005 20:05:48 +0000, Dave Hinz wrote: 

    ufsdump is not on my system but Google tells me it's used in Solaris. I
    guess I could download it, but it seems to be over-kill for this one-time
    use. Can't I accomplish this with either cp, tar, dd or cpio?

    jim
    --
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    _/ Everything should be made as simple as possible, but not simpler.
    _/ -- Albert Einstein
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    Jim Guest

  6. #6

    Default Re: How to dupe a file system?

    Jim Showalter wrote: 
    >
    > Sorry, just didn't think those details were relevent as long as we're
    > talking Unix.[/ref]

    Very relevant because there are many different answers.
     

    Different size drive means you can't do the copy at the block
    level so you need to use a filesystem-aware tool. Dump and
    restore.
     

    You're moving the data but not the boot, right? There's far more
    involved in moving boot.

    Doug Guest

  7. #7

    Default Re: How to dupe a file system?

    "Doug Freyburger" <com> writes:
     
    >>
    >> Sorry, just didn't think those details were relevent as long as we're
    >> talking Unix.[/ref]
    >
    > Very relevant because there are many different answers.

    >
    > Different size drive means you can't do the copy at the block
    > level so you need to use a filesystem-aware tool. Dump and
    > restore.[/ref]

    Except that there is no dump for reiserfs. According to
    http://www.namesys.com/faq.html#dumprestoretar

    Can I use "dump" and "restore" with ReiserFS? Any caveats?

    No. dump uses knowledge of the internal structure of ext2 and works
    together with restore, which also uses ext2 specific knowledge, to back
    up ext2 files. dump and restore are specific to ext2 and will not work
    with ReiserFS.

    To back up ReiserFS files use tar, which is universal and can be
    applied to almost any reasonable Linux filesystem.

    It is well known among system administrators that dump is more complete
    than unix tar, and that there is quite a list of things that unix tar
    will fail to properly backup. This is not true of Gnu tar, which is
    quite complete.


    Bye, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!
    Dragan Guest

  8. #8

    Default Re: How to dupe a file system?

    On Thu, 04 Aug 2005 17:09:37 -0400, Dragan Cvetkovic wrote: 

    So Gnu tar will do it Ok then? Well, it's quick, what have I got to loose? :)

    jim
    --
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    _/ Everything should be made as simple as possible, but not simpler.
    _/ -- Albert Einstein
    _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    Jim Guest

  9. #9

    Default Re: How to dupe a file system?

    Jim Showalter wrote:
     
    >
    > Sorry, just didn't think those details were relevent as long as we're
    > talking Unix.
    >[/ref]
    [...]

    As luck would have it, they don't in the case of cpio, or gnu-tar. (the
    default [ and only] tar command on SuSe, on many unices you would need to
    download and install it)

    gnu-tar preserves hard-links, symbolic links, block and character special
    files, fifos. Tt even handles sp files

    In short, to create your backup, a tar -S -cvzf /path/to/archive.tar.gz /


    then, with the new fs loaded, tar -S -xvzf /path/to/archive.tar.gz
    -C /path/to/mountpount entirely


    (if you have the fs mounted already, do something like:
    tar -S --exclude=/path/to/mountpoint -cvf - / | \
    tar -S -C /path/to/mountpoint -xvf -

    Hope it helps.

    Jamie Guest

  10. #10

    Default Re: How to dupe a file system?

    In article <2ywIe.35769$tampabay.rr.com>,
    Jamie Beverly <rr.com> wrote:
     
    > >
    > > Sorry, just didn't think those details were relevent as long as we're
    > > talking Unix.
    > >[/ref]
    > [...]
    >
    > As luck would have it, they don't in the case of cpio, or gnu-tar. (the
    > default [ and only] tar command on SuSe, on many unices you would need to
    > download and install it)
    >
    > gnu-tar preserves hard-links, symbolic links, block and character special
    > files, fifos. Tt even handles sp files
    >
    > In short, to create your backup, a tar -S -cvzf /path/to/archive.tar.gz /
    >
    >
    > then, with the new fs loaded, tar -S -xvzf /path/to/archive.tar.gz
    > -C /path/to/mountpount entirely
    >
    >
    > (if you have the fs mounted already, do something like:
    > tar -S --exclude=/path/to/mountpoint -cvf - / | \
    > tar -S -C /path/to/mountpoint -xvf -
    >
    > Hope it helps.[/ref]

    What about ACL's, if your OS supports them? star does ACLs as well as
    all the other stuff:

    http://linuxcommand.org/man_pages/star1.html

    (I'm sure Joerg, star's author, will chime in here eventually)

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    Michael Guest

  11. #11

    Default Re: How to dupe a file system?



    Even better, gnu-tar does not support ACLs (though it's source does support
    them as a user extension, if somebody would be inclined to write it)

    8-)
    Jamie Guest

Similar Threads

  1. dupe times in Time::HiRes
    By atcproductions@gmail.com in forum PERL Modules
    Replies: 13
    Last Post: April 6th, 08:39 PM
  2. dupe messages from -newbies
    By Ian Smith in forum FreeBSD
    Replies: 0
    Last Post: February 23rd, 10:31 AM
  3. Eliminating dupe votes
    By bateman in forum ASP Database
    Replies: 1
    Last Post: January 5th, 01:40 PM
  4. Dupe Prevent on Form Submit
    By entoone in forum PHP Development
    Replies: 3
    Last Post: October 29th, 11:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139