Hi all...
I'm trying to perform a full backup of my routers (firmware + packages) to be restored in case of problems ...
My routers are WDR4300, WDR3600 and Archer C7 V4, if this information is relevant.
I am basing myself on this topic => [Solved]How to restore a full backup firmware .bin file by command inside router? - #12 by dktn
I believe that the backup script is working correctly, as it saved the files in / tmp ...
root@isis:/usr/bin# ./backup.sh
Full flash backup store at /tmp/full_flash.bin.
Saving config files...
Full config backup store at /tmp/full_config.tar.gz.
root@isis:/usr/bin#
root@isis:/usr/bin#
root@isis:/usr/bin# ls -la /tmp
drwxrwxrwt 17 root root 540 Mar 30 13:26 .
drwxr-xr-x 1 root root 4096 Mar 26 16:34 ..
drwx------ 2 root root 60 Mar 29 21:53 .uci
-rw-r--r-- 1 root root 7 Mar 29 22:02 TZ
-rw-r--r-- 1 root root 938 Dec 31 1969 board.json
lrwxrwxrwx 1 root root 18 Mar 29 22:02 collectd.conf -> /etc/collectd.conf
-rw-r--r-- 1 root root 0 Mar 29 21:53 dhcp.leases
drwxr-xr-x 2 root root 40 Mar 29 21:53 dnsmasq.d
drwxr-xr-x 3 root root 100 Mar 29 22:02 etc
-rw-r--r-- 1 root root 11733 Mar 30 13:26 full_config.tar.gz
-rw-r--r-- 1 root root 16515070 Mar 30 13:26 full_flash.bin
drwxr-xr-x 2 root root 60 Mar 29 22:02 hosts
drwxr-xr-x 3 root root 60 Mar 29 21:53 lib
drwxr-xr-x 2 root root 400 Mar 30 11:09 lock
drwxr-xr-x 2 root root 80 Mar 29 21:53 log
-rw------- 1 root root 28527 Mar 29 21:58 luci-indexcache
-rw-r--r-- 1 root root 4850 Mar 29 21:58 luci-indexcache.v7DDPir3yqymxl4Cd3A8a..json
drwxr-xr-x 2 root root 1000 Mar 29 22:01 luci-modulecache
-rw-r--r-- 1 root root 32 Mar 29 22:02 resolv.conf
-rw-r--r-- 1 root root 39 Mar 30 13:00 resolv.conf.auto
drwxr-xr-x 3 root root 60 Mar 29 21:54 rrd
drwxr-xr-x 6 root root 320 Mar 30 13:00 run
drwxrwxrwt 2 root root 40 Dec 31 1969 shm
drwxr-xr-x 2 root root 80 Mar 29 21:59 state
drwxr-xr-x 2 root root 80 Dec 31 1969 sysinfo
drwxr-xr-x 2 root root 40 Mar 29 21:53 tmp
drwxr-xr-x 3 root root 60 Mar 30 10:50 usr
root@isis:/usr/bin#
But the restore script, returns the error below ...
root@isis:/usr/bin# ./restore.sh
64+0 records in
64+0 records out
15807+1 records in
15807+1 records out
Could not open mtd device: factory
Can't open device for writing!
Unlocking firmware ...
Writing from /tmp/firmware.bin to firmware ... [e]Failed to erase block
root@isis:/usr/bin#
Can anyone help me with this?