#!/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/firebird-tools-resrore - Firebird SQL Server restore # # Creation: 2004-02-14 jv # Last Update: $Id$ # # Copyright (c) 2004-2010 Jens Vehlhaber, jvehlhaber(at)eisfair(dot)org # Copyright (c) 2015-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- #include eislib . /var/install/include/eislib export FIREBIRD='/usr/lib/firebird' # --------------------------------------------------------------------------- # check for running # --------------------------------------------------------------------------- if [ -z "$(pgrep '(fbserver|fbguard)')" ] then mecho "" mecho --error "Firebird is not running" mecho "" anykey exit 1 fi clrhome # Read DATA_DIRECTORY . /etc/config.d/firebird # Run mount command if [ -n "$FIREBIRD_BACKUP_MOUNT" ] then eval ${FIREBIRD_BACKUP_MOUNT} fi # --------------------------------------------------------------------------- # select file and make backup # --------------------------------------------------------------------------- /var/install/bin/list-files.cui -t "Select database for restore"\ -c "Backupfile:"\ --path="$FIREBIRD_BACKUP_TARGET,$FIREBIRD_DATA_DIRECTORY,/tmp" \ --filter=*.gbk,*.fbk \ --only=1 \ --date \ --wait \ --script="/usr/bin/fgrest.sh" \ --helpfile=/var/install/help/firebird \ --helpname=FIREBIRD_MENU_RESTORE # Run umount command if [ -n "$FIREBIRD_BACKUP_UMOUNT" ] then eval ${FIREBIRD_BACKUP_UMOUNT} fi exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------