Single database backup using ontape
Posted in 2007
Topics: Backup & Restore, Storage & Space Management
hi I am a newbie in informix. I am searching if there is any way of taking database level backup rather than whole system(-s) or dbspace wise backup? Any parameter to specify Database name. If it is so then what will be the backup and restore command?
Hi,
A backup of a single database can be taken with onunload or dbexport
(first one is binary, and does not support user defined types or
lvarchar columns, second is text export).
The command to restore is unload/dbimport depending on used export prog.
For a restore, the database has to be dropped first (or of course can be
restored on another instance).
Dbexport format is mostly used between versions.
The commands would be :
(onunload into a named file)
# pre-create the file with correct permissions
touch /dir/exportfile
chown informix:informix /dir/exportfile
chmod 660 /dir/exportfile
onunload -t /dir/exportfile dbname
(dbexport to a dir, each table data will be a separate file)
dbexport dbname -o /dir
The database must not be in use (no active session) when executing these
commands.
Detailed syntax you can find under
http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp
Marcus
-----Original Message-----
From: SHAILESH MISHRA [mailto:mishra_shailesh@rediffmail.com]
Sent: Tuesday, December 11, 2007 10:51 AM
To: ids@iiug.org
Subject: Single database backup using ontape [10680]
hi
I am a newbie in informix.
I am searching if there is any way of taking database level backup
rather than whole system(-s) or dbspace wise backup? Any parameter to
specify Database name.
If it is so then what will be the backup and restore command?
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
Unfortunately, ontape is ALL-or-NOTHING kind of backup utility. You can do
Full (level 0), Incremental, and Differential, but you're still grabbing
Dbspaces rather than just individual DB's.
If you have backups of a single DB, look at onunload, onbar, or
High-performance loader. Onunload will be the easiest to use.
# onunload -t <tape dev or file name> <database name>
HTH
Jonathan B. Smaby
DBSA
Pomona College, ITS-AISO Office
> From: SHAILESH MISHRA <mishra_shailesh@rediffmail.com>
> Reply-To: <ids@iiug.org>
> Date: Tue, 11 Dec 2007 04:51:22 -0500 (EST)
> To: <ids@iiug.org>
> Subject: Single database backup using ontape [10680]
>
> hi
> I am a newbie in informix.
> I am searching if there is any way of taking database level
> backup rather than whole system(-s)
> or dbspace wise backup? Any parameter to specify Database name.
>
> If it is so then what will be the backup and restore command?
>
>
>
******************************************************************************
> *
> Forum Note: Use "Reply" to post a response in the discussion forum.
-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.
SHAILESH MISHRA wrote:
> hi
> I am a newbie in informix.
> I am searching if there is any way of taking database level
> backup rather than whole system(-s)
> or dbspace wise backup? Any parameter to specify Database name.
>
> If it is so then what will be the backup and restore command?
>
Ontape can only be used to archive an entire server instance. That
done, you can restore a single dbspace from those tapes and you can use
archecker to restore data from individual tables in any database
contained in the archive.
Onbar can be used the same way but also includes point-in-time restore.
To archive a single database, as was mentioned, use dbexport which must
lock the database during the export, or get my dbexport/dbimport
replacement utility, myexport, which does not require a lock (two
features are offered to minimize or eliminate internal inconsistencies
from exporting the data from a running/active server - parallel export
and import under constraint filtering).
Art S. Kagel
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>