3 # shell script to restore a dump of the bacula Ingres database using
4 # a base64 encoded tar of the content.
9 db_name=${db_name:-@db_name@}
10 db_user=${db_user:-@db_user@}
11 working_dir="@working_dir@"
14 # Source the Ingres settings when they exist.
16 [ -f ${bindir}/../../.ingIIsh ] && . ${bindir}/../../.ingIIsh
19 # See if the dumpdir exists.
21 [ ! -d ${working_dir}/ingres_dump ] && mkdir -p ${working_dir}/ingres_dump
24 # Decode the tar and restore it.
26 cd ${working_dir}/ingres_dump || exit 1
29 base64 -d | gzip -dc | tar xf -
32 uudecode -p | gzip -dc | tar xf -
35 echo "Unsupported OS type encountered, `uname -s`"
44 sql -u${db_user} ${db_name} < copy.in
50 rm -rf ${working_dir}/ingres_dump