LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Backup NVRAM from a remote device to a local computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/backup-nvram-from-a-remote-device-to-a-local-computer-4175557705/)

dorsio 11-01-2015 09:29 AM

Backup NVRAM from a remote device to a local computer
 
I tried backup(copy) NVRAM from remote embedded device using telnet and console access(over a WAN), and save it to a file on local computer.
The MTD partition map for NVRAM:
Code:

MTDs:
dev:    size  erasesize  name
mtd7: 00050000 00010000 "nvram"

Mounts:
...
/dev/mtdblock7 /nvram jffs2 rw 0 0

NVRAMADDR=0x48FB0000

I run on local computer:
Code:

nc -l -p 5555 > nvram.bak
and on remote device:
Code:

dd if=/dev/mtdblock7 bs=00010000 count=5 | nc 192.168.1.20 5555
but got the following:
Code:

BusyBox v1.4.2 (2010-04-30 17:58:45 CST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # dd if=/dev/mtdblock7 bs=00010000 count=5 | nc 192.168.1.20 5555
5+0 records in
5+0 records out
nc: cannot connect to remote host (192.168.1.20): Connection timed out

and on local PC:
Code:

admin@debian:~/Downloads$ nc -l -p 5555 > nvram.bak
Can't grab 0.0.0.0:5555 with bind

What can be the problem?

jefro 11-02-2015 09:56 PM

There are a few hundred great examples on the web on netcat. Funny part is that they seem to be all different. To add to the confusion no all netcat is compiled the say.

I might suggest you try this web page for an example. Kind of the opposite of they way you have it set up.
http://www.cyberciti.biz/tips/howto-...r-network.html

Be sure the ports are open too.

Other page
"
On the VM: nc -l -p 9001 | dd of=/dev/sda

On your source machine: dd if=/dev/sda | nc 9001
"

dorsio 11-03-2015 01:35 PM

Thanks for tips. I tried different versions of command, but no one of them is working. I always get error "Cannot connect to remote host (x.x.x.x): Connection timed out." Perhaps netcat implementation on Busybox is somehow limited.
Also,I find that the same BusyBox v1.4.2 version installed on two similar devices, have difference in defined functions: Busybox on one device have no 'nc' option defined.
I tried use TFTP and it works fine.


All times are GMT -5. The time now is 01:56 AM.