|
本帖最后由 liujc 于 2020-4-15 06:19 编辑 4 } W& u* b3 Z* L% X* ?
/ ?0 z( e' F& Z$ R1 c. i/ C! [
HS8546V5 备份恢复教程* h4 v+ p/ ~7 \1 o: Q) V' c% ^% }( w
1 Q2 a7 |$ l( `# y' J! k备份数据下载地址见文末,HS8346V5 联通界面备份数据下载:
, P! }5 n8 P0 ~- k$ g2 P* whttps://www.chinadsl.net/forum.php?mod=viewthread&tid=167163&extra=
+ N6 {5 G+ W: b6 a$ F1 }6 K- o+ h! ^. u3 F2 q c% @2 r6 E
备份恢复方法有二种,一是用U盘,二是用TFTP软件% u0 m* x }1 w
. q6 a# Z' A$ w1 _) C. t4 T: c
特别提示:) J2 W+ {' \ ~# T+ G, H, ?7 E4 A% B
1、必须补全shell5 {4 t* t* o2 X. Y; G
2、恢复分区和jffs2数据有变砖的风险,请谨慎! i7 ]! ]* j" n1 V' m, k
; f" Z# l* [/ k( m" P一、U盘备份恢复方法* w. O' P. U1 {" S" K8 @9 e
4 P# w6 g4 G f" B! {5 F
1、备份分区:: n* I3 t+ D7 ?6 A( b
将U盘(剩余空间大于1G)插入光猫后面的USB口
0 W' [7 x% K6 f6 [4 [Win+R — cmd (按Windows徽标键和R键,输入cmd 进入命令窗口)
( }' X% E* F* \ b3 @; O/ Etelnet 192.168.1.1, O: F* q0 M. }2 W, V
root
3 @# T5 u7 E; cadminHW
4 P: L$ p; R$ r5 v, ?su
- v; ]8 d! Z# _* K) `2 w9 q# J6 Dshell& G2 n) b- R6 G0 m7 h
mount /dev/sda1 /mnt/usb (挂载U盘)/ r9 x7 L' @* D, g# @6 Y
dd if=/dev/mtd0 of=/mnt/usb/0.bin (备份分区0到U盘0.bin文件)
) A9 ]/ f- o/ t/ W0 a& Z- o# ?( ldd if=/dev/mtd1 of=/mnt/usb/1.bin0 M. t7 Z* u8 S" N2 E& m
dd if=/dev/mtd2 of=/mnt/usb/2.bin
; [5 w2 R6 O, l1 a& V5 Cdd if=/dev/mtd3 of=/mnt/usb/3.bin& x( {! n9 ^5 Q1 L6 J: P6 y% y2 X! `9 c
dd if=/dev/mtd4 of=/mnt/usb/4.bin2 u2 O+ h* R6 l; p9 q. j
dd if=/dev/mtd5 of=/mnt/usb/5.bin
, Y( y$ e* _& Ydd if=/dev/mtd6 of=/mnt/usb/6.bin& s1 s! _8 z( K+ @5 s, S }
dd if=/dev/mtd7 of=/mnt/usb/7.bin- U9 O' h$ K% ^1 U
dd if=/dev/mtd8 of=/mnt/usb/8.bin
2 c, q. ~: R8 A5 d& _; }$ U! ~dd if=/dev/mtd9 of=/mnt/usb/9.bin
/ [7 |4 K4 w8 u* S# u' T' hdd if=/dev/mtd10 of=/mnt/usb/10.bin2 I- D: S" F7 z% G. W! x( G; t
dd if=/dev/mtd11 of=/mnt/usb/11.bin: o. X+ n) ^, j& v8 n- m) N
dd if=/dev/mtd12 of=/mnt/usb/12.bin
) e7 E% T+ @" {- k* C/ e9 k! Z2 r8 P$ u. t% K4 R0 C6 V7 U
单独备份jffs2和APP:) {0 F) y: Q/ m1 |; B* ], o5 }
* H9 n* n! P: c3 Odd if=/dev/mtdblockubi0_9 of=/mnt/usb/0_9.bin' |5 W1 G/ O0 G" C
dd if=/dev/mtdblockubi0_10 of=/mnt/usb/0_10.bin
' k5 |& P' S5 I$ U1 \
/ }* g) T: ~3 Z- @2、恢复分区:- O; X+ [3 L1 w
7 A! M# Z% I' Y' O* D& ?5 c' z' v将所有备份文件复制到U盘,U盘插入光猫后面的USB口
3 p$ e( n/ i3 Q/ P- M+ B) L# }3 y3 }# V, w- L0 k
telnet 192.168.1.1
/ k9 z& g) @4 \root5 _& l& c( Q" l4 o9 ^' {8 }
adminHW
$ \ M) J- G2 |4 b$ I- lsu, u/ A5 G4 L# E5 n
shell* q' A. n+ A: ?% K2 }( K
mount /dev/sda1 /mnt/usb$ @9 B M' f, S2 K! r
dd if=/mnt/usb/0.bin of=/dev/mtdblock0 (恢复U盘0.bin文件到分区0)
h: |8 k1 l4 D {5 R: d+ qdd if=/mnt/usb/1.bin of=/dev/mtdblock12 |: U# C3 V" D2 Q
dd if=/mnt/usb/2.bin of=/dev/mtdblock2
" C# C- V4 A4 F% A% q }dd if=/mnt/usb/3.bin of=/dev/mtdblock3
5 v9 \' Y+ Q$ k2 |dd if=/mnt/usb/4.bin of=/dev/mtdblock4
7 L0 d' g" h1 g# f8 \dd if=/mnt/usb/5.bin of=/dev/mtdblock5" L9 F' h% u! e$ S3 ~: Y9 F# i7 c
dd if=/mnt/usb/6.bin of=/dev/mtdblock6
0 y9 o( [, z9 l! P$ D7 {* M! Bdd if=/mnt/usb/7.bin of=/dev/mtdblock7
+ _4 h, Q2 G$ F( N$ Bdd if=/mnt/usb/8.bin of=/dev/mtdblock8
. u4 I. t+ L7 _3 Wdd if=/mnt/usb/9.bin of=/dev/mtdblock9+ z x- h6 y \% j9 r& ^
dd if=/mnt/usb/10.bin of=/dev/mtdblock10
5 t1 }0 W1 k0 {3 b) k. z$ r% |dd if=/mnt/usb/11.bin of=/dev/mtdblock115 X4 x; D4 ~7 D& |4 U' n! h! \( S
dd if=/mnt/usb/12.bin of=/dev/mtdblock12
/ M+ T( m! p: V4 c/ O5 ?+ i4 ]7 J" C* T5 u7 k2 k% [
以上命令是恢复全部分区。; U/ @9 C2 l& E3 {; F, a0 u
3 q n/ C1 W- d& T4 `! Z
单独恢复jffs2和APP:
. ~/ Y, U5 o; v" R0 i
# U5 ^0 c( b- H! x, C( u6 I0 gdd if=/mnt/usb/0_9.bin of=/dev/mtdblockubi0_9 @( M4 z: g* W s7 G
dd if=/mnt/usb/0_10.bin of=/dev/mtdblockubi0_107 D! K& U x: z" J" t- r% [# c: @
, k( u3 _, u% B+ c- @8 Zreboot (重启光猫)
' P8 Z& ~! c$ l1 c' I' Q
3 i2 F0 Y& C- f3、备份 jffs2文件夹 :+ m* C: g, b& J6 X2 p. m% J
' d$ a+ C6 v9 I
U盘(剩余空间大于1G)插入光猫后面的USB口
: b7 x4 M# w7 Z+ G
; s- S) B& c$ K5 W9 Ktelnet 192.168.1.1
, k3 {; M. i/ F8 y# t5 wroot% q# `9 P; e$ r0 ?& ~+ P
adminHW
8 S# k; S. A3 H2 Z: Asu' H; {/ O( E- q
shell
- z/ A, {$ F# P' l3 Xcd /mnt/ (进入/mnt 目录); c+ H0 A( w9 ?# i$ `1 h
cp -r jffs2 /mnt/usb1_1/ (备份整个文件夹到U盘)
9 l$ g; ?5 r; _: U
8 K, V+ w1 A$ x- v4、恢复 jffs2文件夹 :* j( V! O8 B' }+ I# a9 \; y5 w
3 [/ n# z' s8 w* `' n
将备份文件夹复制到U盘,U盘插入光猫后面的USB口& a# n1 i9 b* W r4 K! o
" o* O9 m* s G- T* v: L* j& n
telnet 192.168.1.1; t; q1 Q H8 ~
root- p) c0 a0 P- J, p& W/ j' o
adminHW
: Z( a2 c' x: n4 l) s/ Rsu
! I0 i4 d$ d6 Z) ^( p2 P) jshell
; \7 i: p1 F- J9 g" X/ Wcd /mnt/usb1_1/
2 v/ S) Z: f, ]$ N% Dcp -r jffs2 /mnt/ (复制jffs2文件夹到mnt目录下,替换原jffs2文件夹)
- j* s3 @3 X( k* Lreboot
6 l2 q2 U5 m( c4 {9 ]- H' U* l5 d+ t3 p$ {8 l! v( n( f) M
(PS:删除jffs2文件夹所有文件:rm -rf /mnt/jffs2/* 删除jffs2文件夹内所有文件和文件夹:rm -rf * )
5 t, @% i0 m1 [; B
( H/ E! H) Y6 A, L5 B" k8 D二、TFTP软件备份恢复方法
, v# i, v! y) S/ Y
( R3 i" \# A( s6 a" Q5 |$ L# r注意:用此方法备份恢复比较繁琐,不建议用此方法!!!
) x5 h e5 Z: c1 i/ A' f& s1 X- |; F7 I# z3 z
首先要打开TFTP软件,并设置好工作目录。
6 Y# y- E) z9 J' W% ?* k' p* q. `, a, g
1、备份分区0 D$ U, u F7 Y- _# X
# {' O- }' s" h/ Q8 k8 ~
telnet 192.168.1.1
4 Z6 ^6 E; A1 aroot
% |, @& o) |0 \. s% |+ ^! padminHW
, F- f0 T: B) g Z1 K" jsu
' t2 V2 z- ^; U+ qshell8 s z! A+ y" b, M- e
dd if=/dev/mtd0 of=/dev/shm/0.bin
: G0 _$ H4 c% g% v; G$ Hdd if=/dev/mtd1 of=/dev/shm/1.bin8 l( @; z4 T \1 l7 [: p
dd if=/dev/mtd2 of=/dev/shm/2.bin5 C8 |/ ?% K' G K7 g$ T' G
dd if=/dev/mtd3 of=/dev/shm/3.bin$ O |! |. W' M
dd if=/dev/mtd4 of=/dev/shm/4.bin* A* c; _2 Q$ J
dd if=/dev/mtd5 of=/dev/shm/5.bin
- x) m' _9 R; g2 B2 f* Add if=/dev/mtd6 of=/dev/shm/6.bin! }! x- y- f! k7 o. O1 B
dd if=/dev/mtd7 of=/dev/shm/7.bin% N7 E U- _) p% N2 S* d ], l' d9 k
dd if=/dev/mtd8 of=/dev/shm/8.bin7 r# u I5 Q( I' f1 A
dd if=/dev/mtd9 of=/dev/shm/9.bin
! f- r9 f% W! L1 l; u( }dd if=/dev/mtd10 of=/dev/shm/10.bin, M" v- @! {2 S) }2 k: x) w
dd if=/dev/mtd11 of=/dev/shm/11.bin" N1 n( E; O- b; d7 q1 {& `1 _, C# p
dd if=/dev/mtd12 of=/dev/shm/12.bin
+ W. y$ S* m' I0 Q3 g: r0 \cd /dev/shm
* x3 m w$ k% A/ V4 E4 v! }5 L% Dtftp -p -l 0.bin -r 0.bin 192.168.1.3 (复制文件到电脑TFTP目录 192.168.1.3 为IP地址)' m" n3 x: h9 d; W& J
tftp -p -l 1.bin -r 1.bin 192.168.1.3
1 v' ^$ X( K# _2 j F9 otftp -p -l 2.bin -r 2.bin 192.168.1.3; D `$ P- m S" f
tftp -p -l 3.bin -r 3.bin 192.168.1.3+ ~+ \% V8 M) W6 f- d! R- z; w
tftp -p -l 4.bin -r 4.bin 192.168.1.3, f1 B# V* B$ J0 B- K$ Z/ W
tftp -p -l 5.bin -r 5.bin 192.168.1.3
+ f4 G( R& Y% Q& p0 \tftp -p -l 6.bin -r 6.bin 192.168.1.3
5 \, Z2 C6 e8 p p2 Ftftp -p -l 7.bin -r 7.bin 192.168.1.31 Z' c* r6 X5 y
tftp -p -l 8.bin -r 8.bin 192.168.1.3
( H' u/ f% D7 m( Jtftp -p -l 9.bin -r 9.bin 192.168.1.3
$ e/ p# s' D* W* E% gtftp -p -l 10.bin -r 10.bin 192.168.1.3$ ]' E. ?$ ~& Z* e' L
tftp -p -l 11.bin -r 11.bin 192.168.1.33 U: `; i- b& d: X, N
tftp -p -l 12.bin -r 12.bin 192.168.1.3
$ l ^! h6 Z0 U6 A5 nrm -rf * (删除备份文件,否则空间不够)
! [9 j* u. s N; M* e6 ~ odd if=/dev/mtdblockubi0_9 of=/dev/shm/0_9.bin8 ~, w- D" M' N+ L; }
dd if=/dev/mtdblockubi0_10 of=/dev/shm/0_10.bin
# t4 i' d5 K9 {* ]' h+ Etftp -p -l 0_9.bin -r 0_9.bin 192.168.1.3
% B) `" {) L5 J/ C Ktftp -p -l 0_10.bin -r 0_10.bin 192.168.1.36 @3 \7 d; U- X) {) {( I1 c( N! ~
rm -rf *
7 Y( R2 t$ I3 F/ L; P
& f e F. s$ D5 K6 b2、恢复分区
- C0 w8 Y4 Y$ e6 S0 B2 M
7 F# J. L5 M8 t1 t# _; ftelnet 192.168.1.15 s# _% x* E& P5 l
root
: J" |9 \3 h# OadminHW% M: m6 F2 [7 ^8 R* ~' O
su
: K! A2 \2 n/ Q6 ~shell: c% H/ t7 k/ l! [+ D7 |
cd /dev/shm
1 J* h" D" t1 _$ E X( Gtftp -g -l 0.bin -r 0.bin 192.168.1.3 (将电脑TFTP目录文件上传到光猫/dev/shm)
6 }4 ]7 z: H$ b1 E4 ytftp -g -l 1.bin -r 1.bin 192.168.1.35 i6 x+ ~/ U. y0 D9 \# H
tftp -g -l 2.bin -r 2.bin 192.168.1.31 w; l8 i4 n5 T$ b2 v
tftp -g -l 3.bin -r 3.bin 192.168.1.3
, l7 ]+ p2 T9 G0 B/ j5 u* L9 F8 Stftp -g -l 4.bin -r 4.bin 192.168.1.3. l8 _* f& D8 X" z( Y
tftp -g -l 5.bin -r 5.bin 192.168.1.3
, K D% ^ ~6 I4 |" }tftp -g -l 6.bin -r 6.bin 192.168.1.3
1 V" g) P) U0 ntftp -g -l 7.bin -r 7.bin 192.168.1.3
, |; ~7 C# B: H' |3 Ptftp -g -l 8.bin -r 8.bin 192.168.1.3# ?; U) s6 `6 ]
tftp -g -l 9.bin -r 9.bin 192.168.1.3
# M% z" M; a0 K2 U0 Z) \$ T# s" V# ?tftp -g -l 10.bin -r 10.bin 192.168.1.3
1 ~: g) N" N; P; Wtftp -g -l 11.bin -r 11.bin 192.168.1.3
' ~5 F2 n3 y# K) w9 U# vtftp -g -l 12.bin -r 12.bin 192.168.1.3# B( N+ ]' p: a! v, |' S! ~8 G
dd if=/dev/shm/0.bin of=/dev/mtdblock04 ?# i- n. K# g
dd if=/dev/shm/1.bin of=/dev/mtdblock1/ w6 j0 E( p6 C) U$ `& {( s
dd if=/dev/shm/2.bin of=/dev/mtdblock2
6 K0 R1 P2 E" A6 {* n5 n9 Odd if=/dev/shm/3.bin of=/dev/mtdblock3, J0 g5 C. l. X c& t
dd if=/dev/shm/4.bin of=/dev/mtdblock4
& X# i! n! V }. v! h. ~, add if=/dev/shm/5.bin of=/dev/mtdblock57 v0 \; l( d3 O1 Q& j& v
dd if=/dev/shm/6.bin of=/dev/mtdblock6
0 w+ j7 u3 ]% A: Jdd if=/dev/shm/7.bin of=/dev/mtdblock7
2 I9 }: h3 T7 K+ b/ {+ @" S6 tdd if=/dev/shm/8.bin of=/dev/mtdblock8
8 s8 \- a$ K" ?3 E) x, B* Mdd if=/dev/shm/9.bin of=/dev/mtdblock99 H5 z( s9 C/ a
dd if=/dev/shm/10.bin of=/dev/mtdblock10
" X& V9 c3 R8 e: n( C( z8 Z; D# Y! Hdd if=/dev/shm/11.bin of=/dev/mtdblock11
1 [7 f9 l2 w' u% G8 Jdd if=/dev/shm/12.bin of=/dev/mtdblock12
, k0 R7 I8 d' x* trm -rf * . p! _ g; i) k* N+ ]; c
tftp -g -l 0_9.bin -r 0_9.bin 192.168.1.3, f7 V* M( W$ S/ F q7 l4 J
tftp -g -l 0_10.bin -r 0_10.bin 192.168.1.3
1 n( Y9 p# l$ W% \dd if=/dev/shm/0_9.bin of=/dev/mtdblockubi0_93 p: a4 e" Z: j- n
dd if=/dev/shm/0_10.bin of=/dev/mtdblockubi0_10
/ _. }$ R+ f/ M1 W# drm -rf * ' ~" L% f/ F+ v+ M# A% z
reboot
! N9 ^% |6 e+ R- W. l5 i2 g, P1 B+ a" a+ V) U$ `( k2 J! [
3、备份 jffs2文件夹:% k5 A( J5 m/ B
- C$ X2 x: ]) W/ c3 N, z4 @
telnet 192.168.1.1
2 Y" y) S+ J9 m' l4 _root0 W! h- Z4 w: P6 q9 u/ j
adminHW
. b4 x. }8 R4 Y% V' Q( bsu- x! O" r9 X$ u+ B% }) B( v9 I
shell
8 y7 Z4 C) t s, g; S8 z7 c% Ecd /mnt/jffs2 + `+ v$ Q$ ]0 `+ t
tar -czf jffs2bak.tar.gz * (压缩jffs2文件夹为 jffs2bak.tar.gz)$ z! W9 Z. [1 M+ \; v: S
mv /mnt/jffs2/jffs2bak.tar.gz /tmp (剪切jffs2bak.tar.gz文件到 /tmp文件夹)0 }1 l6 q& B- j: T( b2 O0 B7 v$ h* g
cd /tmp5 s' l0 U0 E, B: J( i4 E
tftp -p -l jffs2bak.tar.gz -r jffs2bak.tar.gz 192.168.1.33 r9 ]; r, }. R8 W8 t% S
2 C! S* G; e; i3 x4 y
4、恢复 jffs2:
6 B& j) @: j& W
$ `" S$ }; T, V. h$ E" z. K; M8 Qtelnet 192.168.1.18 s8 A. K4 q5 U) L
root; W D( ]$ H$ k+ M% m9 ~8 B
adminHW
; c5 i8 W/ F8 U; o. ksu
! p7 F* \" f3 ^* B f% H3 u2 d! bshell, l5 g9 a/ B b+ J$ a2 o
cd /mnt/jffs2 + u) k+ v( K' h3 o2 Z* l3 K
rm -rf /mnt/jffs2/* (删除jffs2文件夹内所有文件)' \3 z3 Q$ Y! \6 c* I
tftp -g -l jffs2bak.tar.gz -r jffs2bak.tar.gz 192.168.1.3
/ r! x6 e1 ]) u2 q# e# V' ]) otar -xvf jffs2bak.tar.gz (解压备份文件到当前文件夹)
5 S0 h7 L0 n$ w0 B' z- _- }+ drm -rf jffs2bak.tar.gz% }& o* Z& n5 ?, N" v+ A$ Q' ]
reboot
& E# Q; h3 h k$ u" _! }/ \( ]. u; f$ e& [4 S9 T3 N
HS8546V5 移动界面 原厂分区备份,jffs2备份文件:
5 B m3 q) Y3 p' _! c
4 I/ c8 F5 y5 {- uhttps://pan.baidu.com/s/11dtQnPi7Ipv5VBOGuzmSKw 提取码:
3 ?+ g2 B+ D3 H# j- x/ |9 K0 Q! c7 d. W5 c2 t+ R. _. U
7 s. r& I" e) ?- t7 j |
|