From 80c65668a9cf0d9c7ba27923251c29a5f979dae8 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Thu, 4 May 2006 16:42:14 +0000 Subject: [PATCH] plantage de sqlbackup du fait des 'mv' qui peuvent echouer et du set -e --- src/sqlbackup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sqlbackup.sh b/src/sqlbackup.sh index b55d45c5..236fc5d6 100755 --- a/src/sqlbackup.sh +++ b/src/sqlbackup.sh @@ -53,11 +53,11 @@ function dobck { while [ "$i" -gt 1 ]; do next_i=$(($i - 1)) mv -f "${target_dir}/${db}.sql.${next_i}${ext}" \ - "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null + "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null && true i=$next_i # loop should end here done mv -f "${target_dir}/${db}.sql${ext}" \ - "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null + "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null && true if [ "$compressed" -eq 1 ]; then mysqldump -h"$MYSQL_HOST" -u"$login" -p"$pass" "$db" --add-drop-table --allow-keywords -Q -f -q -a -e | gzip -c > "${target_dir}/${db}.sql${ext}"