Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is this route correct to backup/restore an armbian sdcard

Featured Replies

I've read this 

and it surprised me noone mentioned e2image.

 

I'm using armbian orange pi pc build.

The fs is stock ext4 hence why I stick to e2image below.

It is not about cloning a live system, hence the sdcard is plugged into my PC.

 

Fdisk shows a single partition at 4M offset.

 

First I backup the partition table and bootloader

dd if=/dev/sdX of=offset0.img bs=4M count=1

 

Next I backup the single partition with e2image into a qcow2 image

e2image -Qa /dev/sdX1 part0.qcow2

qcow2 only keeps used blocks. My partition size is 14.7G, space taken is 12%. part0.qcow2 file is 1.7G.

 

Done with backup.

 

Now recover onto an sdcard of the same size (I know armbian keeps some % free when expanding the partition, so there is no problem with Xgb cards having different space up to some bytes, Kbs or even Mbs).

 

First recover the partition table and bootloader

dd if=offset0.img of=/dev/sdX bs=4M

Make the kernel aware about the partitions on /dev/sdX

partprobe /dev/sdX

Recover the partition

e2image -rc part0.qcow2 /dev/sdX1

 

That's all, just 2 lines to backup (while only keeping used blocks) and 3 lines to restore.

 

As simple as it is, is it correct overall or mby I've missed something?

 

Update: changed the recover partition command from qemu-img to e2image to utilize the latter's "-c" option targeted for flash drives.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.