Can rman backup a subset of a table

oraclerman

I have been asked to make incremental backups of a table based on the value of one of the fields in the table (called groupid). They want a separate incremental backup for groupid=1, groupid=2, groupid=3, etc… I use rman for entire databases or at least whole tables. Can rman backup a subset of a table?

Best Answer

RMAN only works at the block level & has no idea about the contents of a given block, and therefore cannot do this.

You need to use expdp with the query parameter:

expdp phil/phil directory=myexportdir dumpfile=yourtable.dmp query=yourtable:\"where groupid in (1,2,3)\" tables=yourtable

Obviously, this isn't incremental. There's no really easy way of doing it incrementally based on a query/the data. You'd have to roll your own tool to do it - flashback query could help.

What data volume are you dealing with? If < a few million rows, just export the full data each time.