Changeset 2437
- Timestamp:
- 11/10/08 00:15:19 (3 weeks ago)
- Files:
-
- alternc/trunk/src/sqlbackup.sh (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
alternc/trunk/src/sqlbackup.sh
r2423 r2437 159 159 if [ -e "${target_dir}/${db}.sql.${next_i}${ext}" ]; then 160 160 mv -f "${target_dir}/${db}.sql.${next_i}${ext}" \ 161 "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null 161 "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null || true 162 162 fi 163 163 i=$next_i # loop should end here … … 167 167 if [ -e "${target_dir}/${db}.sql${ext}" ]; then 168 168 mv -f "${target_dir}/${db}.sql${ext}" \ 169 "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null 169 "${target_dir}/${db}.sql.${i}${ext}" 2>/dev/null || true 170 170 fi 171 171 … … 193 193 # 194 194 debug "find ${target_dir} -name \"${db}.*sql${ext}\" -maxdepth 1 -mtime +$last2del -exec rm -f {} \; -ls" 195 find ${target_dir} -name "${db}.*sql${ext}" -maxdepth 1 -mtime +${last2del} -exec rm -f {} \; -ls 195 find ${target_dir} -name "${db}.*sql${ext}" -maxdepth 1 -mtime +${last2del} -exec rm -f {} \; -ls || true 196 196 197 197 # set the name of the backup file with the date of the day … … 247 247 if [ "$compressed" -eq 1 ] ; then 248 248 debug "$command > ${target_dir}/${name_backup_file}.sql${ext}" 249 $command | gzip -c > "${target_dir}/${name_backup_file}.sql${ext}" 249 $command | gzip -c > "${target_dir}/${name_backup_file}.sql${ext}" || echo "backup failed for ${name_backup_file}" 250 250 else 251 251 debug "$command > ${target_dir}/${name_backup_file}.sql${ext}" 252 $command > "${target_dir}/${name_backup_file}.sql${ext}" 252 $command > "${target_dir}/${name_backup_file}.sql${ext}" || echo "backup failed for ${name_backup_file}" 253 253 fi 254 254 fi
