Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Abrar Rashid needed a bash script to split an ontape backup into multiple files on IDS 12.10FC7 because backups reached a 1 TB limit. Kern Doe suggested ontape backup to a directory instead. Marcus Haarmann said ontape writes over 1 TB on ext4 (his biggest DB is about 3.8 TB) and asked the OS; Abrar said UFS. No solution was given.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
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.
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 use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.