'raw' backup of hard disk (Linux to Windows)

Discussion in 'Computer Support' started by Jules, Nov 13, 2006.

  1. Jules

    Jules Guest

    Hi all,

    What's the easiest way of backing up a raw (40GB) hard disk image across a
    network from a source machine running Linux (Knoppix booted from CD) to a
    target machine running XP?

    I can't use 'dd' (raw block input, output to file on SMB share) as I hit
    the 2GB file size limit in Linux. (Which also begs the question of whether
    there's a similar size limit in XP using NTFS? Google helpfully gives all
    sorts of answers for NTFS - 2GB, 4GB, 2TB, and no limit whatsoever)

    (apologies for crosspost - I'm not sure how much Linux knowledge there is
    in the 24hoursupport group!)

    cheers

    Jules
     
    Jules, Nov 13, 2006
    #1
    1. Advertising

  2. Jules

    Jules Guest

    On Mon, 13 Nov 2006 09:03:20 -0700, Douglas Mayne wrote:

    > On Mon, 13 Nov 2006 04:20:01 -0600, Jules wrote:
    >
    >>
    >> Hi all,
    >>
    >> What's the easiest way of backing up a raw (40GB) hard disk image across a
    >> network from a source machine running Linux (Knoppix booted from CD) to a
    >> target machine running XP?
    >>
    >> I can't use 'dd' (raw block input, output to file on SMB share) as I hit
    >> the 2GB file size limit in Linux. (Which also begs the question of whether
    >> there's a similar size limit in XP using NTFS? Google helpfully gives all
    >> sorts of answers for NTFS - 2GB, 4GB, 2TB, and no limit whatsoever)
    >>
    >> (apologies for crosspost - I'm not sure how much Linux knowledge there is
    >> in the 24hoursupport group!)
    >>
    >> cheers
    >>
    >> Jules
    >>

    >
    > I haven't noticed a 2G limit in Linux. Perhaps, upgrade your knoppix or
    > switch to Slax.


    Unfortunately I'm *almost certain* that I can't boot and run Slackware
    entirely from CD (does anyone other than Knoppix provide that?).

    I've been a slackware user since the SLS days; it's pretty much always
    been my distro of choice (with a few minor excursions to Debian and Redhat
    over the years) - once I've got the disk backed up then rest assured that
    Slackware will be going on there as the primary OS :)

    I was surprised about the 2GB limit, too. The Knoppix CD I'm booting from
    was a fresh download as of about three weeks ago. I'm wondering if I'm
    actually hitting some odd 2GB limit when copying across to a SMB share,
    rather than it being a Linux issue as such.

    > The remainder of this post is edited from an earlier post on this topic.


    Thanks for that. I *think* I'm getting somewhere, having grabbed a copy of
    g4u (which is bootable from CD) - it's currently backing up the drive to
    the remote XP machine and has just got past the 8GB mark, so it looks
    like NTFS will support a file large enough.

    > Linux can be used as shown below to make snapshot backups of Windows
    > workstations' partitions which have been formatted NTFS.


    Ahh, NTFS is on the target machine which is receiving the backup image
    (as a file), not the source system.

    The source system does also have XP on it, but it's a Dell (urgh!), which
    means it has a couple of proprietary Dell filesystems on it for system
    restore - and I wanted to back those up too, and I don't think they're
    understandable at the filesystem level by any backup tools (Linux or
    otherwise)

    Once I've got a raw backup of the whole 40GB drive then it's getting
    rebuilt with Slackware on it (and Windows 2k, fingers crossed) - I just
    wanted the raw backup just in case Linux has major problems running on the
    Dell (it's a laptop rather than a desktop, and I'm always a bit wary about
    Linux support for the horrible hardware typically thrown into a laptop :)

    cheers

    Jules
     
    Jules, Nov 13, 2006
    #2
    1. Advertising

  3. On Mon, 13 Nov 2006 04:20:01 -0600, Jules wrote:

    >
    > Hi all,
    >
    > What's the easiest way of backing up a raw (40GB) hard disk image across a
    > network from a source machine running Linux (Knoppix booted from CD) to a
    > target machine running XP?
    >
    > I can't use 'dd' (raw block input, output to file on SMB share) as I hit
    > the 2GB file size limit in Linux. (Which also begs the question of whether
    > there's a similar size limit in XP using NTFS? Google helpfully gives all
    > sorts of answers for NTFS - 2GB, 4GB, 2TB, and no limit whatsoever)
    >
    > (apologies for crosspost - I'm not sure how much Linux knowledge there is
    > in the 24hoursupport group!)
    >
    > cheers
    >
    > Jules
    >


    I haven't noticed a 2G limit in Linux. Perhaps, upgrade your knoppix or
    switch to Slax.

    The remainder of this post is edited from an earlier post on this topic.

    CAUTION: Backing up and restoring are fundamental disk operations. A
    mistake can do damage to your data. Make sure of your intended target,
    double-check all command are composed correctly, etc.

    Linux can be used as shown below to make snapshot backups of Windows
    workstations' partitions which have been formatted NTFS. A dual boot
    workstation or a live CD which includes the ntfsprogs tools provides the
    basic platform for performing the backup. I use ntfsclone combinded with
    netcat, nc to backup over the network. If you want to backup to a Windows
    workstation, then you'll need to get nc for Windows, which is
    available for cygwin, if not standalone. I try to avoid using Windows
    whenever possible. I don't use Windows to hold backups, etc. GNU/Linux is
    much more flexible and I prefer to have the toolset it provides as network
    workstations whenever possible. Linux is running at both ends of the
    network transaction shown below.

    BACKUP
    Steps on computer to be backed up:
    1. Boot Slackware rescue disc, Slax LiveCD or similar with ntfsprogs
    installed.
    2. Start networking and get a network address if necessary.
    3. Determine partitions to be backed up. This assumes hda1 is a Windows ntfs
    partition. Issue this command (after step 1 _below_ for proper sequence):

    ntfsclone -s -o - /dev/hda1 | nc -w 2 storage.network 1234

    Steps on computer which will hold backed up data (computer name=
    storage.network): 1. The above command is executed before step 3 (above):

    nc -l -p 1234 >some_computer.c-drive.sf.img

    RESTORE
    To restore, reverse the process.
    Steps on computer targeted for restoration:
    1. Boot Slackware rescue disc, Slax LiveCD, etc. ntfsprogs will need
    to be available.
    2. Start networking and get a network address if necessary. Assume the
    computer is given the address, 192.168.1.100
    3. Issue this command now:

    nc -l -p 1234 | ntfsclone -r -O /dev/hda1 -

    Steps on computer which holds the backed up data:
    1. nc -w 2 192.168.1.100 1234 <some_computer.c-drive.sf.img
     
    Douglas Mayne, Nov 13, 2006
    #3
  4. On Mon, 13 Nov 2006 06:14:41 -0600, Jules wrote:
    <snip>
    >>
    >> I haven't noticed a 2G limit in Linux. Perhaps, upgrade your knoppix or
    >> switch to Slax.

    >
    > Unfortunately I'm *almost certain* that I can't boot and run Slackware
    > entirely from CD (does anyone other than Knoppix provide that?).


    There are some "derivative" works which use slackware as it basis.
    This is the quite famous:
    http://www.slax.org

    LiveCDs are not too hard to make. I have a slackware-based derivative live
    CD:
    http://www.xmission.com/~ddmayne2/10.2-live/index.html

    I need to work on updating this project, especially now that slackware
    11.0 is out. I also made a live DVD, and the large set of installed
    software is nice. Here are some screenshots from this last summer:
    http://www.xmission.com/~ddmayne2/current -dvd/screenshots/

    >
    > I've been a slackware user since the SLS days; it's pretty much always
    > been my distro of choice (with a few minor excursions to Debian and
    > Redhat over the years) - once I've got the disk backed up then rest
    > assured that Slackware will be going on there as the primary OS :)
    >
    > I was surprised about the 2GB limit, too. The Knoppix CD I'm booting
    > from was a fresh download as of about three weeks ago. I'm wondering if
    > I'm actually hitting some odd 2GB limit when copying across to a SMB
    > share, rather than it being a Linux issue as such.
    >

    I'll test transferring a large file myself later today.

    >> The remainder of this post is edited from an earlier post on this
    >> topic.

    >
    > Thanks for that. I *think* I'm getting somewhere, having grabbed a copy
    > of g4u (which is bootable from CD) - it's currently backing up the drive
    > to the remote XP machine and has just got past the 8GB mark, so it looks
    > like NTFS will support a file large enough.
    >
    >> Linux can be used as shown below to make snapshot backups of Windows
    >> workstations' partitions which have been formatted NTFS.

    >
    > Ahh, NTFS is on the target machine which is receiving the backup image
    > (as a file), not the source system.
    >
    > The source system does also have XP on it, but it's a Dell (urgh!),
    > which means it has a couple of proprietary Dell filesystems on it for
    > system restore - and I wanted to back those up too, and I don't think
    > they're understandable at the filesystem level by any backup tools
    > (Linux or otherwise)
    >
    > Once I've got a raw backup of the whole 40GB drive then it's getting
    > rebuilt with Slackware on it (and Windows 2k, fingers crossed) - I just
    > wanted the raw backup just in case Linux has major problems running on
    > the Dell (it's a laptop rather than a desktop, and I'm always a bit wary
    > about Linux support for the horrible hardware typically thrown into a
    > laptop :)
    >
    > cheers
    >
    > Jules
    >

    Note: comments inline

    You can substitute dd in place of ntfsclone if you want an exact image.
    The split command can also be used as part of the pipeline, as recommended
    by another poster on this thread.

    --
    Douglas Mayne
     
    Douglas Mayne, Nov 13, 2006
    #4
  5. Linux doesn't have a 2G file size limit. The file size limit in Linux is
    2^63 bytes.

    The limit is probably either imposed by CIFS (the original Windows file
    share protocol limited files to 2G) or the Windows filesystem (NTFS has the
    same 2^63 byte limit as Linux, but various incarnations of FAT impose
    smaller limits).

    My bet would be that you are using an older version of SAMBA on your machine
    that obeys the rules for CIFS and imposes the 2G limit. Newer versions of
    SAMBA will permit you to read/write bigger files if the Windows system
    involved supports it.

    Jules wrote:

    >
    > Hi all,
    >
    > What's the easiest way of backing up a raw (40GB) hard disk image across a
    > network from a source machine running Linux (Knoppix booted from CD) to a
    > target machine running XP?
    >
    > I can't use 'dd' (raw block input, output to file on SMB share) as I hit
    > the 2GB file size limit in Linux. (Which also begs the question of whether
    > there's a similar size limit in XP using NTFS? Google helpfully gives all
    > sorts of answers for NTFS - 2GB, 4GB, 2TB, and no limit whatsoever)
    >
    > (apologies for crosspost - I'm not sure how much Linux knowledge there is
    > in the 24hoursupport group!)
    >
    > cheers
    >
    > Jules
     
    James McIninch, Nov 14, 2006
    #5
  6. Jules

    Guest

    I like using dd, NFS and gzip to image a parition, but a backup
    solution is only good if it has been tested. Here is the part of the
    solution I am unsure about.

    If I backup a partition in this manner and the drive gets corrupted, I
    know how to restore everything. But if the drive dies and gets
    replaced, then I'm a little confused.

    Obviously you would partition the new drive and use a partition that is
    at least as big as the backed up partition. And if you used dd/gzip to
    restore the raw data, it will certainly be there. But if the geometry
    of the disk is different, will it work?

    If all filesystems work by cluster number and the cluster numbers are
    logical numbers, then I guess it always works, even for special files
    that might need to be in a fixed location. Is this how the various
    DOS/Windows/Linux filesystems work - are they all based on logical
    sectors/clusters?


    Thanks,
    Mike
     
    , Dec 8, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gary
    Replies:
    2
    Views:
    858
    Walter Mautner
    Oct 28, 2004
  2. Spin
    Replies:
    7
    Views:
    780
    Bill in Co.
    Apr 9, 2008
  3. Spin
    Replies:
    10
    Views:
    2,980
    Bill in Co.
    Apr 9, 2008
  4. ralph
    Replies:
    4
    Views:
    1,622
    Franklin
    Nov 30, 2008
  5. Johnw
    Replies:
    0
    Views:
    792
    Johnw
    Nov 26, 2008
Loading...

Share This Page