Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to exclude some table/tablespace form backup ?

791 views
Skip to first unread message

sielim

unread,
Jun 14, 2011, 6:26:43 AM6/14/11
to
Hello,
I need to make backup of a big production database, but some data should
never be stored
in backups.
Assume that the table/tablespace contains volatile private keys, which are
stored in
some separate database and are maintained (also backed up) separatelly.
Our production database contains only temporary copy of those keys.

In Oracle I have a posibility to exclude a tablespace from backups with a
command:
CONFIGURE EXCLUDE FOR TABLESPACE privkeys;

As you can read in:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.cmd.doc/doc/r0001933.html
there seems to be a possibility in DB2 to backup only selected tablespaces
- what would solve my problem. But as I read in other sources - this is not
so simple,
first I need to have a full backup and vary some other constraints.

Is there a simple solution for DB2 ?

stefan.albert

unread,
Jun 15, 2011, 6:06:43 AM6/15/11
to
Hello,

for this data federation would be a nice thing...


On Jun 14, 12:26 pm, "sielim" <sielim_tnij...@to.tez.wp.pl> wrote:
> Hello,
> I need to make backup of a big production database, but some data should
> never be stored
> in backups.
> Assume that the table/tablespace contains volatile private keys, which are
> stored in
> some separate database and are maintained (also backed up) separatelly.
> Our production database contains only temporary copy of those keys.
>
> In Oracle I have a posibility to exclude a tablespace from backups with a
> command:
> CONFIGURE EXCLUDE FOR TABLESPACE privkeys;
>

> As you can read in:http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=...

MarkB

unread,
Jun 16, 2011, 5:54:43 AM6/16/11
to
On Jun 14, 2:26 pm, "sielim" <sielim_tnij...@to.tez.wp.pl> wrote:
> Hello,
> I need to make backup of a big production database, but some data should
> never be stored
> in backups.
> Assume that the table/tablespace contains volatile private keys, which are
> stored in
> some separate database and are maintained (also backed up) separatelly.
> Our production database contains only temporary copy of those keys.
>
> In Oracle I have a posibility to exclude a tablespace from backups with a
> command:
> CONFIGURE EXCLUDE FOR TABLESPACE privkeys;
>
> As you can read in:http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=...

> there seems to be a possibility in DB2 to backup only selected tablespaces
> - what would solve my problem. But as I read in other sources - this is not
> so simple,
> first I need to have a full backup and vary some other constraints.
>
> Is there a simple solution for DB2 ?

Hello.

You don't have to have a full backup for that since DB2 9.1
You can use rebuild option of restore command.
See Rebuild examples:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.ha.doc/doc/c0024712.html
and rebuild restrictions:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.ha.doc/doc/c0022322.html

Sincerely,
Mark B.

sielim

unread,
Jun 16, 2011, 8:41:35 AM6/16/11
to
Uzytkownik "MarkB" <mark.ba...@gmail.com> napisal w wiadomosci
news:a6e7029e-d190-41fa...@e35g2000yqc.googlegroups.com...

> Hello,
> I need to make backup of a big production database, but some data should
> never be stored
> in backups.
> Assume that the table/tablespace contains volatile private keys, which are
> stored in
> some separate database and are maintained (also backed up) separatelly.
> Our production database contains only temporary copy of those keys.
>
> In Oracle I have a posibility to exclude a tablespace from backups with a
> command:
> CONFIGURE EXCLUDE FOR TABLESPACE privkeys;
>
> As you can read
> in:http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=...
> there seems to be a possibility in DB2 to backup only selected tablespaces
> - what would solve my problem. But as I read in other sources - this is
> not
> so simple,
> first I need to have a full backup and vary some other constraints.
>
> Is there a simple solution for DB2 ?

>You don't have to have a full backup for that since DB2 9.1

Thanks, I didn't know about REBUILD option.

I consider just marking a tablespace with private keys as temporary:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.ha.doc/doc/c0022663.html
and use DECLARE GLOBAL TEMPORARY TABLE command to create table, but as i
see,
there is no possibility to share data across connections.

So - I have to use REBUILD option and it is the solution.

sielim

unread,
Jun 16, 2011, 8:52:26 AM6/16/11
to

Uzytkownik "stefan.albert" <stefan...@spb.de> napisal w wiadomosci
news:cc70996e-66b7-4312...@p20g2000yqg.googlegroups.com...

> for this data federation would be a nice thing...

Yes, I noticed this just after I'd written the post :)
Tiny database with one table and link to that table
in any other databases.
And, as I can read, it is simply achievable with
DB2 Express-C - so easy to test :)

Thanks.

0 new messages