Skip to content
Snippets Groups Projects

remove ./ in output of localdump.sh restore; add db restore hint

Merged Hahn Axel (hahn) requested to merge version-2 into master
1 file
+ 14
4
Compare changes
  • Side-by-side
  • Inline
+ 14
4
@@ -12,6 +12,7 @@
# 2017-03-27 ..... added first param for mode backup|restore
# 2018-02-09 ..... fix: restore-selection of target uses default on return only
# 2021-05-18 ..... move supported backup types to plugins/localdump/[service].sh
# 2021-07-13 ..... remove leading ./ in localdump.sh restore
# ======================================================================
@@ -169,15 +170,24 @@
if [ -d "${BACKUP_TARGETDIR}" ]; then
cd "${BACKUP_TARGETDIR}"
if [ -z $1 ]; then
find -type f | sed "s#__[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9].*##g" | grep -v ".meta" | sort -ud
find -type f | sed "s#__[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9].*##g" | grep -v ".meta" | sort -ud| sed "s#^\./##g"
else
ls -ltr "$*__"*
ls -ltr "$*__"* | sed "s#^\./##g"
fi
cd - >/dev/null
else
color error
echo ERROR: here are no backups for this db type
echo ERROR: ${BACKUP_TARGETDIR} does not exist - here are no backups to restore.
color reset
echo
echo You can try to restore dumps:
echo "1) Restore dump files from a backup set"
echo " `dirname $0`/restore.sh $BACKUP_BASEDIR"
echo "2) Move restored dumps into $BACKUP_TARGETDIR"
echo "3) Start database restore again"
echo " `dirname $0`/localdump.sh restore"
echo
exit 1
fi
}
@@ -354,7 +364,7 @@
else
. $BACKUP_SCRIPT $mode "${sDumpfile}" "${sTargetDb}"
if [ $rc -ne 0 ]; then
if [ $? -ne 0 -o $rc -ne 0 ]; then
color error
echo ERROR: $mode failed. See ouput above. :-/
color reset
Loading