Révision 3e9236bd
Ajouté par Julien Enselme il y a plus de 9 ans
bin/d7-all-dump-individual.sh | ||
---|---|---|
5 | 5 |
|
6 | 6 |
help="# ARGS: auto or manual" |
7 | 7 |
|
8 |
check_arguments $# 1 "$help"
|
|
8 |
check_arguments "$#" 1 "$help"
|
|
9 | 9 |
|
10 |
current_date=$(date "+%Y-%m-%d-%Hh%Mm%Ss")
|
|
10 |
current_date="$(date "+%Y-%m-%d-%Hh%Mm%Ss")"
|
|
11 | 11 |
|
12 |
cd $d7_dir_sites
|
|
12 |
cd "${d7_dir_sites}"
|
|
13 | 13 |
|
14 |
for dir in $(find . -maxdepth 1 -mindepth 1 -type d ! -name all | cut -c3-) ; do
|
|
15 |
cd $dir
|
|
14 |
for dir in "$(find . -maxdepth 1 -mindepth 1 -type d ! -name all | cut -c3-)" ; do
|
|
15 |
cd "${dir}"
|
|
16 | 16 |
drush cc all |
17 |
if [ $1 = 'auto' ] ; then
|
|
18 |
drush sql-dump --result-file=$d7_dir_individual_auto_backup/$dir/$current_date.$dir.sql --gzip
|
|
17 |
if [ "$1" = 'auto' ] ; then
|
|
18 |
drush sql-dump --result-file="${d7_dir_individual_auto_backup}/${dir}/${current_date}.${dir}.sql --gzip"
|
|
19 | 19 |
else |
20 |
drush sql-dump --result-file=$d7_dir_individual_manual_backup/$dir/$current_date.$dir.sql --gzip
|
|
20 |
drush sql-dump --result-file="${d7_dir_individual_manual_backup}/${dir}/${current_date}.${dir}.sql --gzip"
|
|
21 | 21 |
fi |
22 | 22 |
cd - |
23 | 23 |
done |
Formats disponibles : Unified diff
Update scritp so they respect the new convention.