Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-web-393
Commits
c44b1761
Commit
c44b1761
authored
Nov 30, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--exclude does not work in tar in busybox - +workaround
parent
d0a4846d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
update_nand.php
src/update/update_nand.php
+2
-2
No files found.
src/update/update_nand.php
View file @
c44b1761
...
@@ -144,7 +144,7 @@ function backup(){
...
@@ -144,7 +144,7 @@ function backup(){
exec
(
"ubiattach /dev/ubi_ctrl -m 4"
);
exec
(
"ubiattach /dev/ubi_ctrl -m 4"
);
if
(
!
is_dir
(
$UBI_MNT
))
mkdir
(
$UBI_MNT
);
if
(
!
is_dir
(
$UBI_MNT
))
mkdir
(
$UBI_MNT
);
exec
(
"mount -t ubifs -o ro /dev/ubi0_0
$UBI_MNT
"
);
exec
(
"mount -t ubifs -o ro /dev/ubi0_0
$UBI_MNT
"
);
exec
(
"tar -czvf var/
$BKP_NAME
-C ${UBI_MNT}${BKP_DIR} .
--exclude '${UBI_MNT}${BKP_DIR}/backup'
"
);
exec
(
"tar -czvf var/
$BKP_NAME
-C ${UBI_MNT}${BKP_DIR} ."
);
exec
(
"umount
$UBI_MNT
"
);
exec
(
"umount
$UBI_MNT
"
);
if
(
is_dir
(
$UBI_MNT
))
rmdir
(
$UBI_MNT
);
if
(
is_dir
(
$UBI_MNT
))
rmdir
(
$UBI_MNT
);
exec
(
"ubidetach /dev/ubi_ctrl -m 4"
);
exec
(
"ubidetach /dev/ubi_ctrl -m 4"
);
...
@@ -173,7 +173,7 @@ function copy_backup(){
...
@@ -173,7 +173,7 @@ function copy_backup(){
if
(
!
is_dir
(
$UBI_MNT
))
mkdir
(
$UBI_MNT
);
if
(
!
is_dir
(
$UBI_MNT
))
mkdir
(
$UBI_MNT
);
exec
(
"mount -t ubifs /dev/ubi0_0
$UBI_MNT
"
);
exec
(
"mount -t ubifs /dev/ubi0_0
$UBI_MNT
"
);
if
(
!
is_dir
(
"
$UBI_MNT
${BKP_DIR}/backup"
))
mkdir
(
"
$UBI_MNT
${BKP_DIR}/backup"
);
if
(
!
is_dir
(
"
$UBI_MNT
${BKP_DIR}/backup"
))
mkdir
(
"
$UBI_MNT
${BKP_DIR}/backup"
);
exec
(
"tar -C ${UBI_MNT}${BKP_DIR}
/backu
p -xzpf var/
$BKP_NAME
"
);
exec
(
"tar -C ${UBI_MNT}${BKP_DIR}
_bk
p -xzpf var/
$BKP_NAME
"
);
exec
(
"sync"
);
exec
(
"sync"
);
exec
(
"umount
$UBI_MNT
"
);
exec
(
"umount
$UBI_MNT
"
);
if
(
is_dir
(
$UBI_MNT
))
rmdir
(
$UBI_MNT
);
if
(
is_dir
(
$UBI_MNT
))
rmdir
(
$UBI_MNT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment