1 2 Previous Next 21 Replies Latest reply on Sep 20, 2015 8:04 AM by Steven Xing

    Edison backup?


      After spending the past several days learning my way around the Edison, installing software, building applications, and tweaking settings, I'm now curious - is there any way to back up and/or quickly duplicate my work?  When I developed a prototype device based on the Raspberry Pi and wanted to make several copies of the device to hand out for beta testing, it was easy to duplicate everything by popping the SD card, plugging it into my Ubuntu machine, and making an image backup via:


      dd if=/dev/sdx of=/path/to/backup_image bs=1M


      and then being able to duplicate the entire system onto fresh SD cards via:


      dd if=/path/to/backup_image of=/dev/sdx bs=1M


      I know it's wishful thinking, but it sure would be nice to be able to do something similar here. Thoughts anyone?

        • 1. Re: Edison backup?

          Hi rubidium,

          We will investigate and contact you when we have some useful information.



          • 2. Re: Edison backup?

            Hi rubidium,


            Using the dd command you can backup to a USB drive and restore from the USB drive as long as the root password was not set.


            To Backup:

            dd if=/dev/mmcblk0 of=/mnt/sda1/<Any File Name> bs=1M


            To Restore:

            dd if=/mnt/sda1/<File Name> of=/dev/mmcblk0 bs=1M




            1 of 1 people found this helpful
            • 3. Re: Edison backup?

              I've been away for a while, but finally got back to this topic. Sergio's suggestion worked like a charm. Actually, I used a modification to the recipe to compress the image, since all I had was a 4GB flash drive (which was unfortunately just under the capacity of 4GB MMC on the Edison) and was too lazy to go out and buy a bigger drive. Specifically, what I did was:


              On the Edison I wished to clone:

              1. Create a place to mount a USB flash drive. I did 'mkdir /mount/usbdrive'

              2. Plug in a USB drive to the USB OTG port, using a suitable OTG adapter cable and a powered USB hub.

              3. Mount the USB drive: 'mount /dev/sda1 /media/usbdrive'

              4. Create the compressed image: 'dd bs=4M if=/dev/mmcblk0 | gzip > /media/usbdrive/Edison_backup.gz'

              Step 4 took about 35 minutes. (with bs=1M, it takes a lot longer)


              On a brand-new Edison, right out of the box:

              5. Connect via USB.  I'm connecting with a Linux system, so: 'screen /dev/ttyUSB0 115200'

              6. Create a place to mount a USB flash drive. I did 'mkdir /mount/usbdrive'

              7. Plug in a USB drive to the USB OTG port, using a suitable OTG adapter cable and a powered USB hub.

              8. Mount the USB drive: 'mount /dev/sda1 /media/usbdrive'

              9. Transfer the image to the new Edison: 'gzip -dc /media/usbdrive/Edison_backup.gz | dd bs=4M of=/dev/mmcblk0'

              Step 8 took another 35 minutes.


              After step 9, the new Edison responds to every line command with a "segmentation error" indication.  However, after a power cycle, the new Edison comes up as a perfect clone of the old Edison. It also got the partitioning right. On my old Edison, I flashed it with a 1GB root ('/') partition. The cloning resulted a 1GB root as well. The only difference was that when connecting to the new Edison wirelessly, my router assigned a different IP address to it, since it had a different MAC address.


              In just a little over a half-hour, one can completely backup one's Edison, or in just a little over an hour completely clone it.


              Thanks for the useful guidance, Sergio!



              • 4. Re: Edison backup?

                Hi rubidium


                I have an Edison-Arduino breakout board and (2) Edison modules and thought I would try to make a clone of the module I have been using with the SDK and XDK on my Windows 7 machine.


                In my case, I Putty’d into the Edison-Arduino using a USB serial console cable to make a backup on the Edison-Arduino breakout board’s onboard SD card slot. I used an 8GB SD card formatted as FAT32.  The SD card auto mounts during boot.


                I’ve always heard backing up and restoring a live mounted system will cause problems, but since it worked for you and I don’t really know any way to backup the Edison’s partition unmounted, I thought I would give it a try.


                I used this command: dd if=/dev/mmcblk0 of=/media/sdcard/edison_backup.img

                I believe dd uses a 512 byte block size if one isn’t specified. I’ve never had a problem doing it that way, although I know it can move data faster or slower depending on block size.


                It finished without complaint creating a file with these stat’s: Size: 3909091328      Blocks: 7634944    IO Block: 32768  regular file


                I didn’t time it, but it took about ½ an hour.


                So, then I restored it to my 2nd Edison module.  Once again, I Putty’d into it using my USB serial console cable. The SD card auto mounted during boot.  I used this command to restore the image to the new module: dd if=/media/sdcard/edison_backup.img of=/dev/mmcblk0


                It finished without complaint.  I didn’t time the restore either, but it took less than ½ an hour.


                Since you said you had segmentation errors until you power cycled, I didn’t even try anything. I just powered down, rebooted. It works great!


                As near as I can tell, this procedure created an exact working clone of my original module, except for assigning a new IP address.

                I would be interested to hear from anyone who can think of a way to backup/restore the Edison unmounted, either with a Windows or Linux machine.



                • 5. Re: Edison backup?


                  I follow this procedure and it works but I noticed a problem: on the second Intel Edison I have the same bluetooth mac addres of first module! On the other hand, wi-fi interface mac addres are different.


                  Which problem do I have?



                  • 6. Re: Edison backup?

                    Hi arjdan,


                    Yes, that happens when you restore the data to another Edison board, the same results seem to happen to rubidium and toadaze. If this is an issue you can try changing the IP address manually such as in http://www.tecmint.com/ifconfig-command-examples/ .




                    • 7. Re: Edison backup?

                      Hi, sorry but your reply isn't appropriate.

                      I'm speaking of BLUETOOTH, not wi-fi interface, I don't need to change IP address.


                      Bluetooth MAC ADDRESS must be unique and must be read from the interface: why do I have the same mac address?

                      • 8. Re: Edison backup?

                        Hi arjdan,


                        for changing the bluetooth address you can mount /dev/mmcblk0p5. This partition includes a file named 'bluetooth_address' where you can change it.

                        I didn't try it myself but maybe this will work.


                        Regards, mmi

                        • 9. Re: Edison backup?

                          Thanks everyone for contributing to this thread - it's been immensely helpful with duplicating our test boards with Ubilinux - instead of manually reinstalling packages from scripts. It helps a lot when software versions are identical (i.e.development & testing).


                          Here's something that I found helpful when making images; using the "pv" tool to watch the time elapsed, time estimation, transfer progress and transfer rate (it's small and simple to install: sudo apt-get install "pv"). For instance, here's what I used to make in image of the rootfs of one of our boards this morning using a microsd card in a USB reader plugged into the standard USB port on the Edison (I also included the informative output):


                          "dd bs=4M if=/dev/mmcblk0 | pv -s 4G -petar | dd bs=4M of=/media/microsd/ubilinux_rootfs_backup.img"


                          932+0 records ins] [3.98MB/s] [=========================================>                 ] 90% ETA 0:01:32

                          932+0 records out

                          3909091328 bytes (3.9 GB) copied, 935.834 s, 4.2 MB/s

                          0:15:35 [3.98MB/s] [3.98MB/s] [=========================================>               ] 91%           

                          0+29824 records in

                          0+29824 records out

                          3909091328 bytes (3.9 GB) copied, 965.389 s, 4.0 MB/s


                          I hope this helps anyone who needs more information when using dd. pv is a really great tool for a lot of uses, not just watching the progress of dd.





                          • 10. Re: Edison backup?

                            Hi Sergio,


                            I know this is an old post, but I was hoping you could clarify something.  You mention that you can use dd to backup if the root password is not set.  Will I encounter some issue if I try to do this procedure if my root account has a password?  If so, is there a simple way to clear the password?




                            • 11. Re: Edison backup?



                              I'm not sure if you tried it yet, but I just performed a backup from one of our fully-configured Edison/Arduino boards running Ubilinux (with the root password enabled) and restored it into one of our recently received boards. We didn't have any issues with the root or non-root accounts.


                              As expected, all of the backed up accounts simply use the passwords from the the source system.



                              • 12. Re: Edison backup?

                                Hi, correct, I found it.

                                I think it's a very stupid trick to have the bluetooth mac address written in a file.

                                If I delete the bluetooth address file I notice that the bluetoothctl show me another address.


                                The problem is that with "dd if=/dev/mmcblk0 of=/mnt/sda1/<Any File Name> bs=1M" I backup every partition, include /factory.

                                I tried to backup only ROOT and HOME, but the if I restore these two partitions into another edison doesn't work. Maybe because I have to make two dd commands, and when I execute the second command, the partition is already inconsistent.

                                • 13. Re: Edison backup?

                                  Thanks Jeff,


                                  It's nice to have some reassurance that it should work regardless of whether the root password is set.  I haven't tried it yet - I've been hesitating because I only have one Edison, so if something goes wrong with the backup/restore process, I'll have lost everything.


                                  Best regards,


                                  • 14. Re: Edison backup?

                                    I tried to clone my Ublinux build with the gzip / dd instructions mentioned above, but for some reason, after power cycling the flashed Edison I can no longer get a login prompt or any response on the serial connection at all. Was the Edison that you wrote the clone file to already flashed with Ubilinux or was it stock? Mine was stock...maybe that was the reason for the failure?

                                    1 2 Previous Next