Projet

Général

Profil

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

root / bin / d7-all-dump-individual.sh @ 349952e5

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
check_arguments $# 1 "$help"
9
10 683f57f9 Julien Enselme
current_date=$(date "+%Y-%m-%d-%Hh%Mm%Ss")
11 d52a5b2f jenselme
12
cd $d7_dir_sites
13
14 683f57f9 Julien Enselme
for dir in $(find . -maxdepth 1 -mindepth 1 -type d ! -name all | cut -c3-) ; do
15 d52a5b2f jenselme
    cd $dir
16
    drush cc all
17
    if [ $1 = 'auto' ] ; then
18 806918fc Julien Enselme
        drush sql-dump --result-file=$d7_dir_individual_auto_backup/$dir/$current_date.$dir.sql --gzip
19 d52a5b2f jenselme
    else
20 806918fc 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