Re: script for ontake backup in multiple files
Posted in 2017
Topics: Backup & Restore, Logging & Checkpoints
You're using the old script that makes backup complicated.
What is the reason that you need to break the backup into multiple files?You
can just do ontape backup to directory and Informix will name your backup
files automagically including your logical logs.
Let's go GreenThis email contains 100% recycled electrons.
From: ABRAR RASHID <mabrar@i2cinc.com>
To: ids@iiug.org
Sent: Wednesday, September 27, 2017 2:04 PM
Subject: script for ontake backup in multiple files [39999]
Hi,
We need to take backup (ontape) in multiple files using bash script . we are
using IDS12.10FC7.
currently we are using following script but it is not working properly.
1). Main script.
i=inst_name
level=0
.. /inst_name
TAP_FILE=`onstat -c|grep "^TAPEDEV" | awk '{print $2}'`
# mv $TAP_FILE $p_location
touch $TAP_FILE
chmod 660 $TAP_FILE
chown informix:informix $TAP_FILE
/bin/bash mount_tape $i $TAP_FILE &
echo '0\\
\\
\\
'|ontape -s -L $level
2). mount_tape
>mount.out
i=$1
TAP_FILE=$2
.. /$i
tape_size=`onstat -c |grep "^TAPESIZE"|awk '{print $2}'`
tape_size=`echo ${tape_size}*1024|bc`
echo "tape size=$tape_size">>mount.out
a=1
cnt=0
while [ $a -gt 0 ]; do
a=`onstat -g ath|grep ontape|wc -l`
file_size=`ls -l /u/ids_backup/data_test|awk '{print $5}'`
echo "file size=${file_size}" >>mount.out
if [ $file_size -eq $tape_size ]; then
echo $file_size >>mount.out
cnt=`expr $cnt + 1`
echo "cnt=${cnt}">>mount.out
echo " mv ${TAP_FILE} ${TAP_FILE}"_"${cnt}" >moun.out
mv ${TAP_FILE} ${TAP_FILE}"_"${cnt}
touch ${TAP_FILE}
chmod 660 ${TAP_FILE}
echo '\\
'
fi
done
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Backup size reaches to 1T with is OS Limit , That's why we need to split backup in multiple files.
Hi,
Which OS you are running on ?
We are driving our backups to a Linux box.
If you do a remote backup (we do to an external server, on an ext4 filesystem)
via ontape, we are able to write more than 1TB of data. (our biggest DB is
~3.8TB compressed)
If you are using a different filesystem type, then you might run into problems
of course
(but even ext3 should cover 2TB).
Marcus Haarmann
Von: "ABRAR RASHID" <mabrar@i2cinc.com>
An: "ids" <ids@iiug.org>
Gesendet: Donnerstag, 28. September 2017 11:07:05
Betreff: Re: script for ontake backup in multiple files [40002]
Backup size reaches to 1T with is OS Limit , That's why we need to split
backup in multiple files.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
We are using UFS file system for taking backup .