Project

General

Profile

Revision d4c4525a

Added by Julien Enselme about 9 years ago

Use drush aliases to loop on all sites instead of sites.

Close #535

View differences:

bin/d7-all-dump-individual.sh
30 30

  
31 31
cd "${d7_dir_sites}"
32 32

  
33
# cut -c3- is used to transform directories from ./<dirname> to <dirname>
34
for dir in $(find . -maxdepth 1 -mindepth 1 -type d ! -name all | cut -c3-); do
35
    cd "${dir}"
36
    drush cc all
33
for site in $(sites_list); do
34
    drush @"${site}" cc all
35

  
36
    dir=$(get_site_dir_from_name "${site}")
37

  
37 38
    if [ "${mode}" = 'auto' ] ; then
38
        drush sql-dump --result-file="${d7_dir_individual_auto_backup}/${dir}/${current_date}.${dir}.sql" --gzip
39
        drush @"${site}" sql-dump --result-file="${d7_dir_individual_auto_backup}/${dir}/${current_date}.${dir}.sql" --gzip
39 40
    else
40
        drush sql-dump --result-file="${d7_dir_individual_manual_backup}/${dir}/${current_date}.${dir}.sql" --gzip
41
        drush @"${site}" sql-dump --result-file="${d7_dir_individual_manual_backup}/${dir}/${current_date}.${dir}.sql" --gzip
41 42
    fi
42 43
    cd -
43 44
done

Also available in: Unified diff