Ulbach
(usa Debian)
Enviado em 08/03/2017 - 21:27h
Boa Noite,
Estou com dificuldade em automatizar minha rotina de backup/restaure no firebird.
Detalhes da minha configuração:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
FirebirdSS 2.5.7 64Btis
************************ Script de automatização do BACKUP ******************
#! /bin/bash
echo `date`" Iniciando Copia Base" >> /home/user/banco/bp.log
/etc/init.d/firebird stop
cp /home/user/banco/DBMY.FDB /home/user/banco/BKP/backup`date +%d`.FDB
cp /home/user/banco/DBMY.FDB /home/user/banco/BKP/DBMY.FDB
/etc/init.d/firebird start
echo `date`" Iniciando gbak bkp" >> /home/user/banco/bp.log
cd /home/user/banco
/opt/firebird/bin/gbak -b -t -user "SYSDBA" -password "********" DBMY.FDB NOVO.FBK
echo `date`" Iniciando gbak restaura" >> /home/user/banco/bp.log
/opt/firebird/bin/gbak -r -c -user "SYSDBA" -password "********" NOVO.FBK FABRICIO.FDB
echo `date`" Iniciando Volta da Base" >> /script/bkp.log
/etc/init.d/firebird stop
cp /home/user/banco/FABRICIO.FDB /home/user/banco/DBMY.FDB
echo `date`" Iniciando copia Base na rede" >> /home/user/banco/bp.log
chmod 777 /home/user/banco/DBMY.FDB
rm -Rf FABRICIO.FDB
/etc/init.d/firebird start
*************** ERRO apresentado quando rodo do SCRIPT !!!!! **********************************************
gbak: ERROR:Unable to complete network request to host "localhost".
gbak: ERROR: Failed to establish a connection.
gbak:Exiting before completion due to errors