Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] Re: Need a how-to: Backup an Unslung System

Expand Messages
  • M.J. Johnson
    (Yes, I really am following up from a post 10 months ago...) I finally attempted to backup the two partitions on the 1Gb drive from which I boot unslung. I
    Message 1 of 9 , Jan 9, 2010
    • 0 Attachment
         (Yes, I really am following up from a post 10 months ago...)
       
         I finally attempted to backup the two partitions on the 1Gb drive from which I boot unslung.  I attempted to use both cpio and tar, as instructed here.  I did this by pulling the drive, and attaching it to a laptop that I had booted Knoppix 6.2.  It mounted the data partition as sdc1 and the conf partition as sdc2.  I had an external USB drive that is planned on backing everything up to, which was mounted as sdb1.  I attempted to run the cpio command:
       
      knoppix@Microknoppix:/media/sdc1$ sudo find . -print -depth | cpio -ov > /media/sdb1/slug_backup/data.cpio
       
         Although data.cpio was created, it was missing all kinds of data, due to permissions errors.  Examples of such errors include:
       
      cpio: ./root/.wymypy: Cannot open: Permission denied
      cpio: ./.ext3flash: Cannot open: Permission denied
      cpio: ./home/httpd/html/Management/.htpasswd: Cannot open: Permission denied
       
         An attempt to use tar yielded similar results.
       
         What can I/should I do to create a full and complete backup of my unslung drive?
       
         Thanks in advance.

      On Wed, Mar 11, 2009 at 10:53 PM, Mike (mwester) <mwester@...> wrote:

      threeeyedtoad wrote:
      > Okay... trying to take some initiative, I ran across this page (http://wiki.linuxquestions.org/wiki/Dd), which is the most straight-forward explanation I've seen of creating a bit-for-bit backup using dd.
      >
      > Assuming something like this is my answer:
      >
      > dd if=/dev/sda1 of=/share/hdd/data/HDD_1_1_1/backup.img
      >
      > If I've booted from the USB stick, and it is currently being used as root, will there be any problems trying to backup my active root partition using dd?
      >
      > Assuming I'm on the right track here, I'll use this procedure to create three backups: /dev/sda1 (USB flash data filesystem), /dev/sda2 (USB flash conf filesystem), as well as the MBR. The question is: in restoring these backups to another USB stick, what is the restore sequence? Should I restore sda1 and sdb2, and then the MBR, presumably?
      >
      > Thanks again to anyone listening out there...

      You're over-engineering a bit, here -- there's absolutely nothing
      special about the on-disk structure, and Unslung doesn't care at all
      about UUIDs on partitions. So there's no need for "dd", just use cpio
      or tar to back up the files. Also, there's no MBR for Unslung; it boots
      from flash - so all you need is are the contents of the two partitions
      (data and conf).

      The net result is that the procedure looks like this:
      -boot without disks
      -plug in disks
      -use tar to create tarballs of the two partions.

      That's all there is to it.

      Mike (mwester)


    • Mike Westerhof (mwester)
      ... su to root (or try sudo). Knoppix boots up and logs you in as a normal user; you need superuser privs in order to read/write the data for the backup --
      Message 2 of 9 , Jan 10, 2010
      • 0 Attachment
        M.J. Johnson wrote:
        > cpio: ./root/.wymypy: Cannot open: Permission denied
        > cpio: ./.ext3flash: Cannot open: Permission denied
        > cpio: ./home/httpd/html/Management/.htpasswd: Cannot open: Permission
        > denied
        >
        > An attempt to use tar yielded similar results.
        >
        > What can I/should I do to create a full and complete backup of my
        > unslung drive?
        >
        su to root (or try sudo).

        Knoppix boots up and logs you in as a normal user; you need superuser
        privs in order to read/write the data for the backup -- otherwise not
        only will you fail to copy all of the data, the copy itself will have
        the permissions and ownership of the files all wrong.

        -Mike (mwester)
      Your message has been successfully submitted and would be delivered to recipients shortly.