PBP Backups (and newbie intro)
#1
Lightbulb 
Hey folks,

A little background:  this is my first pine64 device.  I've flashed a few androids over the years, and long-time linux engineer.

My PBP arrived a couple weeks ago with Manjaro KDE and I've invested a bit of time getting it set up the way I like.  Currently all I'm doing is tarring everything to a file on USB drive.  But I really want to do an image backup.  Idea being I could flash a new OS, and then restore my image of customized Manjaro if I don't like it.  Or say I bork it bad and just want to revert to a known good state. 

It's always best to backup a quiesced filesystem (preferably unmounted).  I've done a little research here and on wiki and stuff and think I at least have a strategy.  Please let me know what you think:

First, I need to choose a linux distro which I can boot from SDcard.  Then insert a 64GB USB thumbdrive.  Boot the SDcard image.  finally dd the emmc to the USB.  poweroff, eject media and boot back to normal.    To restore, I do the above but dd the other way from USB to EMMC.

Is this a sound strategy or does it take me down a more aggravating path than one I'm not aware of, yet?
Is it better to boot from USB and dd to SD? (instead of the reverse as I described above)?
And where exactly does etcher come into play?  Burning the OS to the SDcard?

Many thanks,
#2
It may be better to dd the mmc device to a .img file rather than to a raw device, as the geometry may differ enough to throw it off when you dd it back to the mmc. Back up that .img file, and use it to restore the mmc later. If you have the extra hardware, you might want to test this on another board like a RPi or a x86 system to make sure you can reproduce it successfully. With that said, this is the method I've used for years to make backups of my RPi installations both for cloning and for restoring after a SD card failure (commonplace in the first few Pi models).
#3
(06-17-2020, 09:22 AM)plarkinjr Wrote: First, I need to choose a linux distro which I can boot from SDcard.  Then insert a 64GB USB thumbdrive.  Boot the SDcard image.  finally dd the emmc to the USB.  poweroff, eject media and boot back to normal.    To restore, I do the above but dd the other way from USB to EMMC.

Is this a sound strategy or does it take me down a more aggravating path than one I'm not aware of, yet?

That will work fine. I might toss gzip compression in the path to reduce the data written, but what you propose will work, as long as the usable space on the USB drive is sufficient to store the full image.

There's e2image that will work for the root filesystem (if it's ext series) by only copying used blocks, which might be nice, but you'll want full partition backups of anything containing the uboot binaries, because some OSes are... a bit creative in how they handle that.

For general messing around, though, the PBP should preferentially boot the SD card over the eMMC. So keep something usable on eMMC, mess around on the SD card. Performance isn't great, but for messing around, it's fine.

Quote:And where exactly does etcher come into play?  Burning the OS to the SDcard?

Etcher is a convenient GUI for writing out images to SD cards, though I've seen it complain about some of the community images. I just use dd.
#4
I'm going to plug Dar (Dar, Brother of Tar) as a great alternative to tar that can also do differential backups with built-in support for strong encryption & compression among many other features.

I'll have to look for a good imager, but so far I use dar. Clonezilla looks interesting.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Would a Pinebook Pro be good for a Linux newbie? cassado10 6 2,507 08-08-2023, 04:58 AM
Last Post: moobythegoldensock

Forum Jump:


Users browsing this thread: 2 Guest(s)