Making a backup

From Sharpfin
Revision as of 21:14, 28 August 2007 by Philipp (talk | contribs) (New page: The reciva module has onboard NAND flash which is used to store the software. The flash is split into several partitions, here's the layout of my IMP box: # cat /proc/mtd dev: size...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The reciva module has onboard NAND flash which is used to store the software. The flash is split into several partitions, here's the layout of my IMP box:

# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00004000 00004000 "NAND BootAgent"
mtd1: 000fc000 00004000 "Linux Kernel"
mtd2: 00d00000 00004000 "Root"
mtd3: 00100000 00004000 "Config"
mtd4: 00100000 00004000 "Debug"
mtd5: 00000000 00004000 "Data"

A simple bacup mechanism is storing the raw contents of the block devices. I've been told that simply using cat or cp is not safe on NAND devices, but a better alternative exists: the 'nanddump' tool.

If you've got ssh running, the following is a method of creating a back of the partitions. Run these commands on another machine on the network where you want to store the backups:

$ ssh root@<address-of-the-box> "nanddump /dev/mtd/0 -" > backup/mtd0

Repeat the command for each flash partition, increasing the 0 to 5.