1 |
d52a5b2f
|
jenselme
|
#!/bin/sh
|
2 |
|
|
|
3 |
06e9d071
|
Assos Assos
|
. /home/assos/bin/scripts-config.sh
|
4 |
d52a5b2f
|
jenselme
|
. scripts-utils.sh
|
5 |
|
|
|
6 |
|
|
help="# ARGS: auto or manual"
|
7 |
|
|
|
8 |
3e9236bd
|
Julien Enselme
|
check_arguments "$#" 1 "$help"
|
9 |
d52a5b2f
|
jenselme
|
|
10 |
8550e097
|
Julien Enselme
|
current_date=$(date "+%Y-%m-%d-%Hh%Mm%Ss")
|
11 |
d52a5b2f
|
jenselme
|
|
12 |
3e9236bd
|
Julien Enselme
|
cd "${d7_dir_sites}"
|
13 |
d52a5b2f
|
jenselme
|
|
14 |
8550e097
|
Julien Enselme
|
for dir in $(find . -maxdepth 1 -mindepth 1 -type d ! -name all | cut -c3-); do
|
15 |
3e9236bd
|
Julien Enselme
|
cd "${dir}"
|
16 |
d52a5b2f
|
jenselme
|
drush cc all
|
17 |
3e9236bd
|
Julien Enselme
|
if [ "$1" = 'auto' ] ; then
|
18 |
b2da2166
|
Julien Enselme
|
drush sql-dump --result-file="${d7_dir_individual_auto_backup}/${dir}/${current_date}.${dir}.sql" --gzip
|
19 |
d52a5b2f
|
jenselme
|
else
|
20 |
b2da2166
|
Julien Enselme
|
drush sql-dump --result-file="${d7_dir_individual_manual_backup}/${dir}/${current_date}.${dir}.sql" --gzip
|
21 |
d52a5b2f
|
jenselme
|
fi
|
22 |
|
|
cd -
|
23 |
|
|
done |