Announcement

Collapse
No announcement yet.

Making A Backup Image Of My Linux Machine To A Network Storage Device (Solved)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Making A Backup Image Of My Linux Machine To A Network Storage Device (Solved)

    I've scoured the net, searched forums, read wiki's, etc. in an effort to find a backup program that I can use to create an image of my Linux machine. I've looked at LiveCD, SystemRestoreCD, partimage, Debian dd, BackupPC, and the list goes on.

    My backup needs are quite simple. I have a dual boot WinXP / Kubuntu desktop PC which is networked with an HP Media Vault via a wireless connection. All I want to do is to save the image of my Linux partition to my Media Vault. The problem is, referencing the above listed programs, that none of these programs seem to be able to make a backup image of any partition that is currently mounted.

    This means that if I download partimage (for example) which is a Linux program then I can not use it to backup the same, and only, Linux partition from which the program is running. This seems to be a conundrum of sorts. It is a Linux program but I can't use it to backup the image on which partimage is running. Only other partitions can be backed up. This is very confusing to me.

    Enter LiveCD and other image making programs that install via cd on a reboot. Using these programs I can backup any partition because none of the drives or partitions are mounted which solves the problem I described above. However, I can not connect to my Media Vault, which is where I want to store my images, because the LiveCDs do not configure my wireless network connections which prevents me from seeing the Media Vault.

    So, for the tenth time, I have walked outdoors and screamed at the top of my lungs in frustration. So far, my neighbors have not called the police but I feel that their patience is nearing and end. So, please, if anyone can lend some assistance, tips, or ideas I would be very, very appreciative.

    So would my neighbors.

    Mike
    sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

    #2
    Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

    Mike, Mike, Mike ....

    Look at the How To's section of the Forum. Specifically, Qqmike's dd Command

    This will do what you want - make a complete image of a mounted partition. I did this myself a few days ago - imaged my root partition while I was using it.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

      Ok, I read the entire article. It is a tuff read for a linux Noob but I made it through okay. Now, from what I could tell, all the created images were saved to a hard drive that existed on the same computer. I would use that method BUT my old computer does not have the extra capacity to do so. My Linux partition is about 28 Gigs and I only have about 10 gigs for free space left on the drive. That is why I need to backup to my network storage via wireless connection.

      Is there a way to use dd over a wireless network and, if yes, then how do I configure the connection? (This is where I hope I did not miss anything in reading the article you referenced. )

      Thanks,

      Mike
      sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

      Comment


        #4
        Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

        Qqmike can probably answer that question better than I. But, if your network storage location can be identified as a directory - you can cd to it - then you should be able to use the dd command and point the of= accordingly.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

          Yep, well hopefully someone can chime in. I've been using Linux for a few months now and have struggled to get it setup as well as I have it now - Samba, OpenSSH, sFTP, NFS, networking out the wazuu - and it is secure. I'd sure hate to loose all that effort when, not if, but when my hard drive crashes.

          My only other option would be using an external hard drive connected via a USB cable and dd directly to that. Now where did I put that 320 Gig internal SATA drive and external drive enclosure that I bought from NewEgg? Oh yeah, I sent it back because I bought the HP Media Vault.
          sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

          Comment


            #6
            Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

            You'll have to read through, carefully, the section (search for this) called Operating System Cloning over network: in Unix DD Command and Image Creation which describes how to use the dd command over a network connection. I'm not real sure that it will resolve your question of getting a backup (clone) of your system to your HP Media Vault, but ....
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

              Just a thought - I'm using a dual boot system - XP and Kubuntu on an 80 Gig drive. Would it be possible to dd my Kubuntu image to my XP partition? Maybe create a folder in the NTFS partition called "Linux" then dd to that? If so, that would be kill two birds with one stone as the /dev/hda1 (NTFS) partition is imaged weekly.
              sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

              Comment


                #8
                Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                In the references, AwesomeMachine describes dd over network.
                Only thing about dd is that it is so powerful and unforgiving. You need to be careful and test your results. GParted uses dd when it copies partitions. You might check into GParted and also Partimage (which does not copy byte-for-byte but it more file-oriented, NOT that it matters!) while you are at it.
                Finally, I don't see why dd won't work to copy from one internal HD to another. Again, run a small test and test the test first.
                (remember, some folks remember the origins of this where "dd" = "data destroyer"...)
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                  To image say HDA1 (your primary partition on your primary drive you'd want to follow these:

                  1) Make sure your network storage device is accessible (I'm suggesting samba) by using this tutorial:
                  https://wiki.ubuntu.com/MountWindowsSharesPermanently
                  Any prolems, see this thread:
                  http://ubuntuforums.org/showthread.php?t=280473

                  If you mounted the device to /media/mountpoint then your dd command would be something like
                  Code:
                  dd if=/dev/hda1 of=/media/mountpoint/filename.img
                  Note that now /media/mountpoint is just a reference on your drive to the network location... think symlink.

                  Comment


                    #10
                    Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                    Originally posted by scuzzman
                    To image say HDA1 (your primary partition on your primary drive you'd want to follow these:

                    1) Make sure your network storage device is accessible (I'm suggesting samba) by using this tutorial:
                    https://wiki.ubuntu.com/MountWindowsSharesPermanently
                    Any prolems, see this thread:
                    http://ubuntuforums.org/showthread.php?t=280473

                    If you mounted the device to /media/mountpoint then your dd command would be something like
                    Code:
                    dd if=/dev/hda1 of=/media/mountpoint/filename.img
                    Note that now /media/mountpoint is just a reference on your drive to the network location... think symlink.
                    So, doing this will allow me to make an image of my Linux partition in the following ways:

                    (1) With Kubuntu open and running?
                    (2) The image is of the mounted partition where Kubuntu resides? (No need to unmount)
                    (3) The image is sent wirelessly to my network storage device.

                    If the answer to all three = "Yes" then I think this would be my dd comand:
                    dd if=/dev/hda1 of=/mnt/mediavault/filename.img assuming the media vault is mounted correctly. Am I in the ballpark here?

                    Thanks,
                    Mike
                    sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                    Comment


                      #11
                      Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                      Can't speak for the network part of it, but the dd part, maybe:

                      dd if=/dev/hda1 of=/mnt/mediavault/filename.img conv=noerror,notrunc

                      or,

                      dd if=/dev/hda1 of=/mnt/mediavault/filename.img bs= 4096 conv=noerror,notrunc

                      which would copy in block sizes of 8 sectors = 8*512=4096 bytes, perhaps faster than the default bs which is 1 sector = 512 bytes; notrunc means copy the whole thing—don't truncate trailing zeros-- without notrun, trailing zeros exceeding five zeros will appear as one asterisk *; noerror means don't stop on errors—seems to be a standard recipe for this application—you don't want dd stopping on you—just let it go and copy all—I think it pads any space not copied with zeros or null, I forget; this is what I've been using with good results, fwiw;

                      The trick is to always test any backup! (Sometimes easier said than done.)
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                        rsync might be what you are looking for. This will create a backup of the files rather than creating an exact image of the disc(s). rsync works great over ssh. Again this only copies the file system and not a direct image of the drive, which might not work for the MBR of the drive. In that case I would copy the MBR using dd to a directory on the drive, then use rsync to copy the files over ssh.

                        Mike

                        http://www.mikerubel.org/computers/rsync_snapshots/

                        I used the above link to create an automatic backup script. It contains some really good info, including how to use rsync over ssh.
                        http://monte48lowes.blogspot.com

                        Comment


                          #13
                          Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                          Originally posted by Qqmike
                          Can't speak for the network part of it, but the dd part, maybe:

                          dd if=/dev/hda1 of=/mnt/mediavault/filename.img conv=noerror,notrunc

                          or,

                          dd if=/dev/hda1 of=/mnt/mediavault/filename.img bs= 4096 conv=noerror,notrunc

                          which would copy in block sizes of 8 sectors = 8*512=4096 bytes, perhaps faster than the default bs which is 1 sector = 512 bytes;
                          Ok...what am I doing wrong here? I think I formatted this command correctly but nothing seems to be happening. Below is a copy of the fdisk -l output with the dd commands I tried below it.
                          Device Boot Start End Blocks Id System
                          /dev/sdb1 * 1 1083 8187448+ 83 Linux
                          /dev/sdb2 1084 2586 11362680 5 Extended
                          /dev/sdb5 1084 1455 2812288+ 82 Linux swap / Solaris
                          /dev/sdb6 1456 2586 8550328+ 83 Linux


                          mrms@closet:~$ sudo dd if=/dev/sdb2 of=/mnt/mediavault/MediaShare/sdb2kubuntu.img
                          2+0 records in
                          2+0 records out
                          1024 bytes (1.0 kB) copied, 0.0177026 seconds, 57.8 kB/s

                          mrms@closet:~$ sudo dd if=/dev/sdb2 of=/mnt/mediavault/MediaShare/sdb2kubuntu.img conv=noerror,notrunc
                          2+0 records in
                          2+0 records out
                          1024 bytes (1.0 kB) copied, 0.020389 seconds, 50.2 kB/s


                          I checked the destination folder which is on my network drive (wireless) and a 1024KB file of the correct name (sdb2kubuntu.img) is there so it did transfer. Only 1024 Kb? I know I'm missing something here. Any ideas?

                          Thanks!
                          Mike
                          sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                          Comment


                            #14
                            Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                            Well, from what Qqmike provided, you omitted the last part of the command:
                            bs=4096 conv=noerror,notrunc

                            So, if you retry it as:
                            Code:
                            dd if=/dev/hda1 of=/mnt/mediavault/filename.img bs=4096 conv=noerror,notrunc
                            you might see better results.
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Re: Making A Backup Image Of My Linux Machine To A Network Storage Device

                              I knew someone was going to mention that. I actually did use all his syntax but the results were no better. See below:

                              mrms@closet:~$ sudo dd if=/dev/sdb2 of=/mnt/mediavault/MediaShare/sdb2kubuntu.img bs=4096 conv=noerror,notrunc
                              0+1 records in
                              0+1 records out
                              1024 bytes (1.0 kB) copied, 0.0199298 seconds, 51.4 kB/s

                              sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                              Comment

                              Working...
                              X