home‎ > ‎backup‎ > ‎

backup ext

Perform an external backup

infx backup type=ext

Performs an external backup of the instance by:
  • blocking the instance, onmode -c block
  • executing the external backup command
  • unblocking the instance, onmode -c unblock

external backup script

A sample external backup script is included in /infx/local/script/sample/ext-backup. This sample simply makes a tar archive of all the chunk files in the instance chunk directory.

#!/bin/sh
#
# test external restore using tar/gzip
#
# include disclaimer

mkdir $INFX/backup
mkdir $INFX/backup/ext
cd /tmp

if [ -e $INFX_CHKDIR ] ; then 
cd $INFX_CHKDIR
tar cvf - . | gzip -c >$INFX/backup/ext/$INFORMIXSERVER.tar.gz
else
echo dir:$INFX_CHKDIR not found
fi

example

Perform an external backup using the sample script.

demo1@bobii:/home/informix>infx backup type=ext

onmode -c block executed
./
./idx04.000
./pool.002
./sblob01.000
./sblob01.001
./log02.000
./root.001
./tmp01.000
./dat02.000
./log01.000
./ltmp01.000
./plog.000
./blob01.000
./idx03.000
./dat01.000
./idx01.000
./tmp02.000
./idx02.000
./dat04.000
./dat03.000
onmode -l executed
onmode -c unblock executed

The external backup script was executed and it created a tar archive of all the database chunks.

notes

  • the backup service automatically blocks and un-blocks the instance
  • see 8. BAR manager for information on how to change the command that the external backup uses.