Skip to content
Snippets Groups Projects

Db Profiles

1 file
+ 7
1
Compare changes
  • Side-by-side
  • Inline
+ 7
1
@@ -183,7 +183,7 @@
# restore: show profiles from that exist backups
# global string BACKUP_BASEDIR base directory of all backups
function listBackupedServices(){
find "${BACKUP_BASEDIR}" -mindepth 1 -maxdepth 1 -type d | sed "s#^${BACKUP_BASEDIR}/##g" | sort
find "${BACKUP_BASEDIR}" -mindepth 1 -maxdepth 1 -type d | sed "s#^${BACKUP_BASEDIR}/##g" | sort | grep "^[a-z]"
}
# ------------------------------------------------------------
@@ -449,6 +449,12 @@
restore)
h1 "RESTORE DATABASE"
if ! listBackupedServices; then
color.echo error "ERROR: No database dump was found in [${BACKUP_BASEDIR}]."
exit 1
fi
if [ -z $1 ] || [ ! -f "$1" ]; then
parService="$1"
Loading