Projet

Général

Profil

Paste
Télécharger (599 octets) Statistiques
| Branche: | Révision:

root / bin / d7-all-dump-individual.sh @ 932c2f6c

1
#!/bin/sh
2

    
3
. /home/assos/bin/scripts-config.sh
4
. scripts-utils.sh
5

    
6
help="# ARGS: auto or manual"
7

    
8
check_arguments "$#" 1 "$help"
9

    
10
current_date=$(date "+%Y-%m-%d-%Hh%Mm%Ss")
11

    
12
cd "${d7_dir_sites}"
13

    
14
for dir in $(find . -maxdepth 1 -mindepth 1 -type d ! -name all | cut -c3-); do
15
    cd "${dir}"
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
19
    else
20
        drush sql-dump --result-file="${d7_dir_individual_manual_backup}/${dir}/${current_date}.${dir}.sql" --gzip
21
    fi
22
    cd -
23
done