From 84cacc0ea678093f3940b78c79f9c5e2b51f9e7d Mon Sep 17 00:00:00 2001 From: Yaco Date: Sun, 8 Sep 2019 08:27:04 -0300 Subject: corrige script para que borre la copia vieja de la db --- bin/sync/sync-wiki.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/sync/sync-wiki.sh b/bin/sync/sync-wiki.sh index 434d2352..6bd6abec 100755 --- a/bin/sync/sync-wiki.sh +++ b/bin/sync/sync-wiki.sh @@ -40,6 +40,7 @@ echo "" echo "" echo "###################" echo "Descomprimimos y reemplazamos la BD local por la remota" +rm "/tmp/*.sql" bunzip2 "/tmp/$REMOTO-$DB.sql.bz2" # mysql --user=$USER --password=$PASSWORD -e "CREATE database if not exists $BDIMPORT;" mysql --user=$USER --password=$PASSWORD $DB < "/tmp/$REMOTO-$DB.sql" @@ -51,6 +52,6 @@ echo "Vamos a sincronizar algunos directorios con archivos desde $REMOTO a este sleep 2s rsync -P -r -a -v -e "ssh -l reevo" --delete "$REMOTO:/srv/reevo-2020/files/wiki/" "/srv/reevo-2020/files/wiki/" -# echo "" -# echo "Borramos los temporales" -# rm "/tmp/$REMOTO-$DB.sql" +echo "" +echo "Borramos los temporales" +rm "/tmp/$REMOTO-$DB.sql" -- cgit v1.2.1