copy system to new microUSB

  • Hi All,

    I want to copy the whole drive (system + data) from my current usb drive to a new microSD card.
    I was going to use dd over ssh, but wasn't sure if/how to prepare the microSD card in the first instance (if I needed to?) Or if I should use the LE USB creator to do it, then plug it into the device, then dd the two partitions?

    Any/all suggestions welcome.

    I also will update to the latest build also.

    Thanks

  • Opening one thread on the same topic will do, opening three threads is overkill even on New Year's Day. ;)
    [hr]
    You can use Win32diskimager for copying usb sticks / sd cards.

    You can also use the Backup/Restore tool and make a backup. Create the other sd cards with the LE USB-SD Creator tool, and restore the backup on each sd card.


  • Opening one thread on the same topic will do, opening three threads is overkill even on New Year's Day. ;)
    [hr]
    You can use Win32diskimager for copying usb sticks / sd cards.

    You can also use the Backup/Restore tool and make a backup. Create the other sd cards with the LE USB-SD Creator tool, and restore the backup on each sd card.

    Hey Klojum
    Not sure how I posted three times!

    Anyway, that worked a treat.
    My precise steps:

    * Create backup to 'backup' folder on current boot drive (now called 'old')
    * Create new LE system via the LE USD-SD creator tool (called 'new')
    * Boot to new LE system
    * Insert 'old' usb drive
    * restore from 'old' usb drive (was easy to find and almost immediate).
    * reboots a few times - remove old usb drive.

    I also updated LE to the latest build:
    * using samba, copied the new tar and drive map file to the update folder
    * reboot

    Everything seems normal.

    Thanks for your help!

  • You could try rpi-clone Here. It uses rsync which I believe is installed already on LE. It can be run standalone in the home folder as ./rpi-clone. (No need to copy to /usr/local/sbin as in the install instructions)
    I haven't tested it on LE yet but it works on Raspbian and has the added bonus that the system doesn't have to be shutdown.

  • You could try rpi-clone Here. It uses rsync which I believe is installed already on LE. It can be run standalone in the home folder as ./rpi-clone. (No need to copy to /usr/local/sbin as in the install instructions)
    I haven't tested it on LE yet but it works on Raspbian and has the added bonus that the system doesn't have to be shutdown.

    I just used this script to clone my LibreELEC 9.2.8 micro SD card on rpi2. This project forked from the one mentioned by Iridium and was tweaked specifically for LibreELEC. I had to install Network Tools (Addons->Install from repository->LibreELEC Addons->Program add-ons->Network Tools) to get the required rsync tool.

    I put the command in a backup.sh script so I don't need to remember the arguments next time I use rpi-clone. I only had one destination micro SD card in a USB adapter so destination "sda" might be different for you if you have multiple destinations (sda, sdb, sdc...). It's fast (partitioning can be skipped if destination partitions are identical) and only content is copied not empty sectors. Also the system doesn't have to be shutdown as mentioned by Iridium.

    Bash
    #!/bin/sh
    
    # Call LibreELEC SD card cloning script that came from:
    # https://raw.githubusercontent.com/ypchen/LibreELEC-clone/master/rpi-clone
    
    /storage/.kodi/userdata/scripts/rpi-clone sda -v