eval ${cmd} "$@" 2>&1 | tee -a "${LOGFILE}"
}
+#------------------------------------------------------------------------------
+LN() {
+ local cmd="ln"
+ if [[ "${VERBOSE}" == "y" ]] ; then
+ cmd+=" --verbose"
+ fi
+ eval ${cmd} "$@" 2>&1 | tee -a "${LOGFILE}"
+}
+
#------------------------------------------------------------------------------
empty_line() {
if [[ "${QUIET}" == "y" ]] ; then
local out_sql_tmp_compressed="${TMP_DIR}/${output_sql_compressed}"
local out_sql_tgt="${BACKUP_DIR}/${output_sql}"
local out_sql_tgt_compressed="${BACKUP_DIR}/${output_sql_compressed}"
+ local out_sql_tgt_latest="${BACKUP_DIR}/${db}-latest.sql.bz2"
local verbose_option=""
if [[ "${VERBOSE}" == "y" ]] ; then
debug "Moving '${out_sql_tmp_compressed}' => '${BACKUP_DIR}' ..."
MV -i "${out_sql_tmp_compressed}" "${BACKUP_DIR}"
+ debug "Updating reference '${out_sql_tgt_latest}' -> '${out_sql_tgt_compressed}'"
+ LN -sf "${out_sql_tgt_compressed}" "${out_sql_tgt_latest}"
}