Projet

Général

Profil

Révision 98fad019

Ajouté par Julien Enselme il y a environ 10 ans

Change source url in database the url of the copy.

Voir les différences:

bin/d7-sync-site.sh
32 32
    dir=assos.centrale-marseille.fr.$2
33 33
fi
34 34
if [ -z "$new_site" ] ; then
35
    drush -y @$1 sql-dump | gzip  > $d7_dir_individual_manual_backup/$dir/$current_date.$dir.sql.gz
35
    drush -y @$1 sql-dump --result-file=$d7_dir_individual_manual_backup/$dir/$current_date.$dir.sql --gzip
36 36
fi
37 37

  
38 38
# Sync files
......
46 46
    temp_path=$(drush @$2 vget --format=string file_temporary_path 2> /dev/null)
47 47
fi
48 48
## Sync
49
drush -y sql-sync @$1 @$2
49
current_date=$(date "+%Y-%m-%d-%Hh%Mm%Ss")
50
sql_file=$dir_tmp/$current_date.$1.sql
51
drush -y @$1 sql-dump --result-file=$sql_file
52
sed -i -e "s#https?://assos.centrale-marseille.fr/$1#https://assos.centrale-marseille.fr/$2/g" $sql_file
53
drush -y @$2 sql-sync --create-db --source-dump $sql_file
50 54
## Restore file system
51 55
if [ -n "$private_path" ] ; then
52 56
    drush -y @$2 vset file_private_path $private_path

Formats disponibles : Unified diff