hatahata Posted April 3, 2016 Share Posted April 3, 2016 hi all . i try clone sd card on running orange pi (cone 32GB to 16GB). original sd is 32GB , clone sd is 16GB . 1) insert USB sd converter ( 16GB sd is in ). this is recognized as sdb because i alredy attach USB HDD. 2) i alredy install boot loader into sdb (16GB). see -> http://forum.armbian.com/index.php/topic/897-backup-restore/ so mkfs.ext4 /dev/sdb1 3)mount /dev/sdb1 /mb1 and run the next shell script ---------------------------------------- cd /mb1dfpwdcp --archive /bin /etc /home /lib /opt /root /run /sbin /srv /tmp /usr /var /selinux /boot /media ./mkdir -p boot dev sys mnt proc 4) then halt , and replace sd card . orange pi boot with new 16GB sd card . if this is right , backup is easy and time sparing because this is done on running machine . -------------------------------------------- tuyosi Link to comment Share on other sites More sharing options...
Igor Posted April 3, 2016 Share Posted April 3, 2016 What about rsync command which we use for transferring system from SD to USB / NAND / HARD drive? https://github.com/igorpecovnik/lib/blob/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh#L55-L56 .exclude file content example: /boot/* /dev/* /proc/* /sys/* /media/* /mnt/* /run/* /tmp/* Mount destination under /destination and execute: rsync -avrltD --delete --exclude-from=.exclude / /destination Link to comment Share on other sites More sharing options...
hatahata Posted April 4, 2016 Author Share Posted April 4, 2016 thanks for great advice . i try another orange pi PC running armbian , this is ordinaly armbian which has 32GB micro sd card only . ( i do not stop armbian , make clone sd card on runnning machine ) i insert USB card reader which has 16GB micro sd card . the chart is after mkfs.ext4 /dev/sda1 mount /dev/sda1 /ma1 run the next shell script shell sctipt is ---------------- dfread Xecho $Xcd /ma1cp --archive /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot /SWAP ./cd /ma1mkdir -p dev proc sys media mnt run tmp i have made swap file as /SWAP 1 month ago on 32GB sd after halt -p i change 32GB for 16GB , armbian boots . how to install boot loader into 16GB micro sd card is http://forum.armbian...backup-restore/ . -------------------- tuyosi Link to comment Share on other sites More sharing options...
hatahata Posted April 4, 2016 Author Share Posted April 4, 2016 i also try the following . then orange pi PC also boot armbian . clone-rsync.batumount /ma1dffdisk -l /dev/sda read Xecho $x mkfs.ext4 /dev/sda1mount /dev/sda1 /ma1 cd /ma1mkdir -p bin etc home lib opt root sbin srv usr var selinux boot for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot dorsync -avHx --delete $x/ /ma1/$x/done cd /ma1mkdir -p dev proc sys media mnt run tmp touch /ma1/SWAPdd if=/dev/zero of=/ma1/SWAP bs=1M count=1024mkswap /ma1/SWAP ------------------------------- the next , umount /ma1dffdisk -l /dev/sda read Xecho $x mount /dev/sda1 /ma1 cd /ma1mkdir -p bin etc home lib opt root sbin srv usr var selinux boot for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot dorsync -avHx --delete $x/ /ma1/$x/done if this is right , fast cloning is done . ------- regards Link to comment Share on other sites More sharing options...
Eng-Shien Wu Posted April 4, 2016 Share Posted April 4, 2016 This project may be what you are looking for: https://github.com/billw2/rpi-clone Although written for Raspbian, it may work for Armbian if you replace every occurrence of 'mmcblk0p2' with 'mmcblk0p1' in the script. [ Disclaimer: I have not tried this myself and am not responsible if your house catches on fire and burns down. :-) ] Link to comment Share on other sites More sharing options...
hatahata Posted April 4, 2016 Author Share Posted April 4, 2016  thanks for good information . ------------------------------------- partclone also use rsync but i have not tried it yet in order to clone sd card's partition . anyway it is easy to clone sd card , so we can take the risk of not booting armbian forever to improve armbian . nothing ventured, nothing gained --------------- my japanese home page is http://orange-pi-2.blogspot.jp/2016/01/orange-pi-2g.html Link to comment Share on other sites More sharing options...
Recommended Posts