Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Using unix "Tar" as the backup for Informix

Using unix "Tar" as the backup for Informix

Using unix "Tar" as the backup for Informix

Hi there,
 I'm new to administration of Informix Universal Server. I really need precise advice from you ppl out there.

I'm using the normal unix tar compress (all files in the server) as the backup after a data dump (to files) process from all the tables in the database. Will that be suffucient for me to restore back the database if a crash happens? why? I was told that i need to have level 0,1,2 backup together logical files backup, why?

I am having IUS 9.14 running on Irix 6.5. Any informative comments is appreciate.


RE: Using unix "Tar" as the backup for Informix

You don't necessarily need level 1 and 2 backups if you do a level 0 backup every time.  Informix can be set up to store its data in either unix ("cooked") files or raw drive space (which is more efficient from Informix's point of view).  If you use raw space, the Unix backup will never see the informix data.

You need to backup logical logs to recover transaction that have occurred since the last checkpoint or to be able to rollback your system to a point before problems ocurred.

I'm fairly new as an Informix DBA, but here is what I do:
Backup the logical logs to a unix disk file (you can set the file name as the logical log tape device using onmonitor).  Then, backup the Unix system using a level 0 (full backup) with tar or whatever.  In addition, do a full backup (level 0) of Informix using ontape -s.  Its easier if you have two tape drives (one for Unix and 1 for Informix), but you can do it with one.

I hope this helps.

RE: Using unix "Tar" as the backup for Informix

I have a SCO Openserver 5.5 system running Informix Dynamic Server.

I have a script which contains the following lines:-

  . /usr/online/bin/setonenv
  echo "Backup was started on $time" >> /log/backup.log
  ontape -s -L $1 << hit
  #tape unload
  echo "Backup was finished on $time\n" >> /log/backup.log

This script is then scheduled via crontab to run every morning @ 2am, for some reason this backup doesn't always run so the script is then run manually in the morning when checked.

Is there another way I can backup this Informix data rather than using ONTAPE?

Any help much appreciated.

RE: Using unix "Tar" as the backup for Informix

What I'm saying below definitely pertains to you if you are using raw devices for your data.  If you are using "cooked" files (or regular Unix files) then it still probably makes sense but since I don't have experience using cooked files I'm not sure:

We also do a level 0 backup nightly.  It takes a little longer to do backups but would make restoring much faster.  Since users can still use the system during backups and not during restores it makes sense to me to do it this way.

I do not recommend that you use 'tar' to do your backups.  You should use the Informix archive utility.  I'm using an older version of Informix Dynamic Server and the utility is "ontape".  Not sure if it's changed.  By letting Informix do the backup you'll know for sure it's being done correctly.  We have never had a problem restoring a backup done from Informix.  If you use 'tar' then every time you add a new chunk you need to remember to include it in your 'tar' script.  If you use Informix that is all done automatically.  In fact I'm not even sure you can do a restore of a database that uses logging if you used 'tar'.  

If you do transaction logging then you also have to have all the logs backed up since your last level 0 backup.  That's the only way you can restore your database to where it was when it crashed.  Otherwise you can only restore it to where it was when you started your last level 0 backup.   We do not do logging because losing 1 day of input or less is acceptable.  Your needs may be different.

RE: Using unix "Tar" as the backup for Informix

You didn't tell me how you store your Informix tables.  Are they on raw disk or are they in Unix files?

If they are regular Unix files in a file system then I don't think I can help you.


RE: Using unix "Tar" as the backup for Informix

How do i know whether I'm using the raw device or unix cooked files? I wasn't the one that set up the DB server and the person has left.

RE: Using unix "Tar" as the backup for Informix

type:  onstat -d

It lists the location of all the database chunks.  If it says something like:


Then it's a raw disk.

If it says something like:


Then it's a regular Unix file.

If you don't know where the data is how can you be backing it up with 'tar'?  

If you can post the output of the 'onstat -d' command I should be able to tell.

Have you been to Informix DBA class?  If not, then I think you need to tell your employer that you need to go.  Being an Informix DBA really requires some formal training.  If they don't do that they aren't being fair to you or themselves.


RE: Using unix "Tar" as the backup for Informix

hi Jane,
Thanks for the reply. we are using cooked files for chunks.
I think u misunderstood the tar backup i mentioned.
The backup process is first using "unload...select..." for every table in our DB into a text file. Then, come the tar command to backup of all the regular unix files which include all these text files also. So the dbspace/chunk location is transparent at all.

Btw, thanks for clarify my doubt and it is really nice to meet people like u (experienced DBA) in this forum.

RE: Using unix "Tar" as the backup for Informix

Wow, that seems like an awful lot of work for a backup.  Of course the good part is you can restore a single table, which you couldn't do if you used Informix to do the backup.  However I don't know how you would apply your logical logs if you needed to do a restore.

As I said I don't have any experience with Dynamic Server and cooked files.

You might want to do a practice backup and restore on a test machine if you have one available just to be sure it will work the way you hope.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close