Skip to content
Snippets Groups Projects
Commit fe6034d0 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

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

parent 0c57c6c1
No related branches found
No related tags found
1 merge request!13remove ./ in output of localdump.sh restore; add db restore hint
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment