Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

How to back up the files larger than 2G.

Regular Advisor

How to back up the files larger than 2G.


I have a cron job to backup my database file completely every day.But as the my database file increase, the size have larger than 2GB now. so how I can't backup my database with tar commmand. The following script is the database backup sh:
#Script for backup database
echo "********backup start ****************"
cd /arrUsr/pddb
tar cv ./act72c01.*
cd /arrayDs/pddb
tar rv ./act72c01.*
tar rv ./mfghelp.*

cd /arrayDs/pddb
tar rv ./nsds.*

cd /arrUsr/qad
tar rv ./qad73
cd /arrayDs
tar rv ./users

echo "*****backup end ***************************************"

And the filesystem of dabase file is the large filesystem already. My question is how to change my backup sh that backup the file larger than 2GB ? who can help me?
Honored Contributor

Re: How to back up the files larger than 2G.

Tar does not work with files larger than 1.99 GB.

If you are dealing with HP servers, I would suggest you to use 'fbackup/frecover' to support >2GB handling.

You may change tar by using:
fbackup -f /dev/rmt/0m -i /data -e /data/log

T G Manikandan
Honored Contributor

Re: How to back up the files larger than 2G.

Native tar does not support for files more than 2GB.

Download the GNU version which can support files > 2GB

if you are using 11.11 get this patch

Patrick Wallek
Honored Contributor

Re: How to back up the files larger than 2G.

The easiest and safest native HP-UX utility to use for backing up files larger than 2GB is fbackup.

fbackup will allow you to specify a graph file which can contain specific directories or files to backup.

# man fbackup

for more information.
Honored Contributor

Re: How to back up the files larger than 2G.


i would prefer to do the changes at the Oracle database level and split the backup files themselves.

Anyway, two possible solutions are:

Solution 1:
Export to a PIPE and have compress and split read the pipe. The result is a couple of 500meg compressed files that consistute the export.

We use the CSH script below for a full export and then test the integrity of the export by doing a full import show = y.
This gives a file with all of my source code and ddl.

#!/bin/csh -vx

setenv UID /
setenv FN exp.`date +%j_%Y`.dmp
setenv PIPE /tmp/exp_tmp_ora817.dmp

setenv MAXSIZE 500m
setenv EXPORT_WHAT "full=y COMPRESS=n"

echo $FN

cd /nfs/ORA-BACKUP/export_mydb_ora817
ls -l

rm expbkup.log export.test exp.*.dmp* $PIPE
mknod $PIPE p

date > expbkup.log
( gzip < $PIPE ) | split -b $MAXSIZE - $FN. &
#split -b $MAXSIZE $PIPE $FN. &

exp userid=$UID buffer=20000000 file=$PIPE $EXPORT_WHAT >>& expbkup.log
date >> expbkup.log

date > export.test
cat `echo $FN.* | sort` | gunzip > $PIPE &
#cat `echo $FN.* | sort` > $PIPE &
imp userid=sys/change_on_install file=$PIPE show=y full=y >>& export.test
date >> export.test

tail expbkup.log
tail export.test

ls -l
rm -f $PIPE

Solution 2:

exp files=(file1.dmp,file2.dmp,file3.dmp,....) filesize=N

and export will create many dmp files, each N bytes in size

Hopefully, this is not your primary Oracle Database backup strategy but RMAN.

Hope this helps!

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Tim Sanko
Trusted Contributor

Re: How to back up the files larger than 2G.

Since I don't work for Carly, I will recommend a third party (gasp) piece of software.

Keep the scripts you are currently using, but buy Microlite's backupedge. I think is less than $500.00 and it will save you much grief in the long run. If you had ever ran into a failed checksum, it can read through it. This is a great product. Some corrupted archives, I have recovered 99% + of a corrupted database and was able to rebuild the indexes to return the system to service.

Substitute edge for tar in the working scripts and you are in business.

Chris Vail
Honored Contributor

Re: How to back up the files larger than 2G.

Let me concur with Tim that MicroLites Backup Edge is a pretty good product. Way back when the earth's crust was first starting to cool, that product was called CTAR, or compressed tar. I've used the versions for Solaris and for SCO.

That being said, you should at least look into compiling GNU tar. You can't beat the price. It'll handle files larger than 2GB, and smaller than 16GB. However, if your DBA's are like my DBA's, they set their .dbf files to 33GB, and almost every utility is useless. We use Netbackup here, which splits the files up into 2GB segments, then tar's them.

Bill Hassell
Honored Contributor

Re: How to back up the files larger than 2G.

tar (and other legacy Unix commands like cpio, pax, dump, etc) are NOT recommanded for today's backup requirements. These (very old) tools were created when a very large disk was 20megs and gigabytes meant rooms full of disk drives. The legacy tools know nothing about tape drives, changers and have no error recovery.

As mentioned, fbackup can handle any filesize, has error recovery (for tape problems), and using a script, can manipulate a tape changer. However, you should establish the value of the data you are saving. Is it worth one million dollars? Then using a cheap backup program is like a cheap insurance policy--it may not work when it is really needed.

Another commercial grade backup tool is HiComp's HiBack program with the added advantage that it handles other flavors of Unix, the HP 3000 and PC operating systems.

Bill Hassell, sysadmin
Geoff Wild
Honored Contributor

Re: How to back up the files larger than 2G.

I like tar - very easy to use and for the most part - cross platform. If you are using 11.i - download this patch for up to 8gb!!!

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
kenny chia
Regular Advisor

Re: How to back up the files larger than 2G.

I'm not too sure about this or if this will work..
but if you pipe the stdout of the tar command to gzip, your resulting tar.gz file will be less than 2GB?
All Your Bases Are Belong To Us!