lunes, febrero 19, 2007

Problems restoring using GBAK: Restoring computed columns using UDF:

There seems to be a problem and some related ones in the restauration of computed by columns in Firebird (1.X, 2.X?)

Aparentemente hay un problema y otros relacionados de orden en la restauracion de columnas computadas en Firebird (1.X 2.X ?).

The work around that worked for me is NOT to use the -o switch (-o[ne_at_a_time] ) of gbak. IBexpert has this option as "commit after each table". The thread in the sourceforge mailing list actually suggest using it, but I got the error WHEN using it!

La "trampita" que hay que hacer para que funcione es NO usar la opcion -o[ne_at_a_time] del gbak. En el IBExpert esta opcion aparece como "commit after each table". El mail en el mailing list de sourceforge sugiere usar la opcion, sin embargo yo tuve problemas al usarla!


IE:

Por ejemplo:

> gbak -r -c -v -z -user SYSDBA -pas XXX -y ..\..\backups\restore.log ..\..\backups\tape-backup.gbk "localhost :C:\Program Files\Firebird\data\TAPE-CENTRAL3.FDB"

gbak's -o restores one table at the time.
La opcion -o del gbak restaura secuencialmente todas las tablas.

The errors I had are:
En la primera prueba me dejo de los errores:

gbak: ERROR:action cancelled by trigger (0) to preserve data integrity
gbak: ERROR: could not find table/procedure for GRANT
gbak:Exiting before completion due to errors

and the infamous:

IBE: Invalid token.
invalid request BLR at offset 2.
function DZERO is not defined.
IBE: Restore completed. Current time: 6:40:28 PM. Elapsed time: 00:00:11

Etiquetas: , ,

miércoles, agosto 31, 2005

USO DE GBAK (INTERBASE / FIREBIRD)

# para backupear una base de datos interbase.
# -B(ACKUP_DATABASE) backup database to file
# -T(RANSPORTABLE) transportable backup -- data in XDR format
# -V(ERIFY) report each action taken
# -Z print version number
# -Y redirect/suppress status message output
# -C(REATE_DATABASE) create database from backup file
# -R(EPLACE_DATABASE) replace database from backup file



# Ejemplos:

# Hacer BK
rm /tmp/backup.log; gbak -b -t -v -user SYSDBA -pas xxx-y /tmp/backup.log localhost:/opt/interbase/data/tape-rk.gdb /tmp/tape-rk.gbk
gbak -b -t -v -user SYSDBA -pas xxx-y /tmp/backup.log localhost:/opt/interbase/data/tape116-5.gdb

/tmp/tape-backup-116-5.gbk

#verificar
cat /tmp/backup.log


# Restaurar BK
gbak -r -c -v -z -user SYSDBA -pas xxx -y /tmp/restore-preparar-lapatria.log /tmp/tape-backup-preparar-lapatria.gbk

localhost:/opt/interbase/data/tape114-1.gdb

#para reemplazar bd
gbak -r -c -v -z -user SYSDBA -pas xxxx -y /tmp/restore-116-5.log /tmp/tape-backup-116-5.gbk

localhost:/opt/interbase/data/tape-desarrollo.gdb

#para crear bd
rm /tmp/restore-116-5.log;
gbak -c -v -z -user SYSDBA -pas xxxx -y /tmp/restore-116-5.log /tmp/tape-rk.gbk localhost:/opt/interbase/data/tape-desarrollo.gdb

gbak -r -c -v -z -user SYSDBA -pas xxx -y /tmp/restaurar-toluca.log toluca.gbk

localhost:/opt/interbase/data/TOLUCA.TRAIDO.GDB

gbak -c -v toluca.gbk weallgodown.gdb

Additionally, there is a command-line tool gsplit that filters the
output of gbak and writes to multiple files on disk. This permits you
to back up a multifile database when the backup file is larger than
the operating system maximum.

Etiquetas: , ,