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

Backing up USB flash memory

Expand Messages
  • Henry Favretto
    Hi there I successfully unslinged to my USB flash memory stick recently. Everything is running fine so far. Now I would like to do a complete backup (image
    Message 1 of 4 , Jul 31, 2006
      Hi there

      I successfully unslinged to my USB flash memory stick recently. Everything is running fine so far.

      Now I would like to do a complete backup (image copy?) of the stick's content so that I can restore everything quickly
      should the stick wear out some beautiful day...

      The stick is connected to port 1. Thus /dev/sdb1 is mounted as / and /dev/sdb2 is mounted as conf (=admin?) partition.
      This is what df tells me:

      Filesystem 1k-blocks Used Available Use% Mounted on
      rootfs 720440 94672 618452 13% /
      /dev/sdb1 6528 6340 188 97% /initrd
      /dev/sdb1 720440 94672 618452 13% /
      /dev/sda1 240125792 203621296 34064948 86% /share/flash/data
      /dev/sdb1 720440 94672 618452 13% /share/hdd/data
      /dev/sdb2 123811 4189 118344 3% /share/hdd/conf
      /dev/sdb2 123811 4189 118344 3% /share/flash/conf

      Since I don't use linux on my PC (yet) what would be the easiest way to achieve this under XP? Is there perhaps a tool
      that can pull a raw image from an USB stick? Or is there maybe an even easier method without having to remove the stick
      from the slug?

      thx for your input.

      henry

      --
      http://www.maschinengeist.org
    • Marcel Nijenhof
      ... There is no real reason to make a image of the stick. Just copy all the files with there permissions to a save place. ... cd /share/hdd/data tar czf
      Message 2 of 4 , Jul 31, 2006
        On Mon, 2006-07-31 at 17:12 +0200, Henry Favretto wrote:

        > Now I would like to do a complete backup (image copy?) of the stick's
        > content so that I can restore everything quickly
        > should the stick wear out some beautiful day...

        There is no real reason to make a image of the stick. Just
        copy all the files with there permissions to a save place.

        >
        > The stick is connected to port 1. Thus /dev/sdb1 is mounted as /
        > and /dev/sdb2 is mounted as conf (=admin?) partition.
        > This is what df tells me:
        >
        > Filesystem 1k-blocks Used Available Use% Mounted on
        > rootfs 720440 94672 618452 13% /
        > /dev/sdb1 6528 6340 188 97% /initrd
        > /dev/sdb1 720440 94672 618452 13% /
        > /dev/sda1 240125792 203621296 34064948 86% /share/flash/data
        > /dev/sdb1 720440 94672 618452 13% /share/hdd/data
        > /dev/sdb2 123811 4189 118344 3% /share/hdd/conf
        > /dev/sdb2 123811 4189 118344 3% /share/flash/conf
        >

        cd /share/hdd/data
        tar czf /share/flash/data/root.tar.gz .
        cd /share/flash/conf
        tar czf /share/flash/data/conf.tar.gz .

        After that you can copy those files to your pc.

        If you realy want an image you can use:
        dd if=/dev/sdb of=/share/hdd/data/stick.img bs=64k

        --
        Marceln
      • Henry Favretto
        ... thanks a lot for the response. still, i have some more (dumb?) questions: what would the restore procedure look like in both of the above cases? i mean,
        Message 3 of 4 , Jul 31, 2006
          Marcel Nijenhof wrote:

          > There is no real reason to make a image of the stick. Just
          > copy all the files with there permissions to a save place.
          >
          > cd /share/hdd/data
          > tar czf /share/flash/data/root.tar.gz .
          > cd /share/flash/conf
          > tar czf /share/flash/data/conf.tar.gz .
          >
          > After that you can copy those files to your pc.
          >
          > If you realy want an image you can use:
          > dd if=/dev/sdb of=/share/hdd/data/stick.img bs=64k

          thanks a lot for the response. still, i have some more (dumb?) questions:

          what would the restore procedure look like in both of the above cases? i mean, lets suppose my stick breaks... what
          would be the fastest way to restore my saved state to a new one?

          do i have to go through the unslinging again before i can start writing back the data?
          or would it be enough just to boot from internal flash, plug in a new stick, format it, restore the data and reboot?
          do i need to disconnect my other drive during first boot up in order to prevent my shares and permissions getting messed up?

          imho the advantage of restoring from an image would be that i dont have to worry about re-creating the partitions one by
          one.
        • Marcel Nijenhof
          ... No. ... Something like that should work. But i don t know the dirty details. I never done this. ... Better safe then sory. ... Thats an advantage and a
          Message 4 of 4 , Jul 31, 2006
            On Mon, 2006-07-31 at 23:52 +0200, Henry Favretto wrote:
            > do i have to go through the unslinging again before i can start
            > writing back the data?

            No.

            > or would it be enough just to boot from internal flash, plug in a new
            > stick, format it, restore the data and reboot?

            Something like that should work.
            But i don't know the dirty details. I never done this.

            > do i need to disconnect my other drive during first boot up in order
            > to prevent my shares and permissions getting messed up?

            Better safe then sory.

            >
            > imho the advantage of restoring from an image would be that i dont
            > have to worry about re-creating the partitions one by
            > one.

            Thats an advantage and a disadvantage at the same time.
            In that case it only works if the sizes are equal.

            An other disadvantage is that you backup the empty space
            as well.

            --
            Marceln
          Your message has been successfully submitted and would be delivered to recipients shortly.