Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
7115bc91
Commit
7115bc91
authored
Dec 08, 2016
by
Mikaël Salson
Browse files
backup.sh: Get the directories from defs.py instead of hardcoding them
parent
f9adbe88
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/backup.sh
View file @
7115bc91
...
...
@@ -24,14 +24,24 @@ now=$(date +"%Y-%m-%d_%H:%M:%S")
vidjil_path
=
web2py/applications/vidjil
db_backup_file
=
/tmp/db-backup-
$now
.csv
defs_py
=
$vidjil_path
/modules/defs.py
if
[
!
-f
"
$defs_py
"
]
;
then
echo
"
$defs_py
doesn't exist. Is the Vidjil server fully installed?"
>
&2
exit
2
fi
DIR_SEQUENCES
=
$(
sed
-rn
"s/^DIR_SEQUENCES.*['
\"
](.*)['
\"
].*
$/
\1
/p"
$defs_py
)
DIR_RESULTS
=
$(
sed
-rn
"s/^DIR_RESULTS.*['
\"
](.*)['
\"
].*
$/
\1
/p"
$defs_py
)
python web2py/web2py.py
-S
vidjil
-M
-R
"applications/vidjil/scripts/backup-db.py"
-A
"
$db_backup_file
"
if
[
$COMPLETE
-eq
1
]
;
then
filename
=
"
${
DIR
}
backup_"
$now
zip
-r
$filename
web2py/applications/vidjil/databases/
/mnt/result/results/ /mnt/upload/uploads/
$db_backup_file
zip
-r
$filename
web2py/applications/vidjil/databases/
"
$DIR_SEQUENCES
"
"
$DIR_RESULTS
"
$db_backup_file
else
filename
=
"
${
DIR
}
backup_essentials_"
$now
zip
-r
$filename
web2py/applications/vidjil/databases/
/mnt/result/results/
$db_backup_file
zip
-r
$filename
web2py/applications/vidjil/databases/
"
$DIR_RESULTS
"
$db_backup_file
fi
rm
-f
"
$db_backup_file
"
echo
$filename
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