One could not make a Partial online backup or Partial backup of a replication Target database with this method because the first step will be to truncate bi. Truncate bi could not be made on running database or one involved in replication as a target.
Here is an example on sports database. Let's assume I am not interested in Customers, Orders, Order-Lines and need to work with static tables only, tables like Item, Salesrep, State, Local-Default, Ref-Call. So I need to backup only area 7 "Info Area" and I would like to skip all other areas from area 8 to area 11.
1. Truncate bi
proutil sports -C truncate bi2. Make a copy of .st file
cp sports.st sports.st.save3. Remove areas that not needed for backup from .st file. Here is how my changed sports.st looks like
# b /workdir/ # d "Schema Area":6,64;1 /workdir/ # d "Info Area":7,32;1 /workdir/4. Build new .db file
rm sports.db prostrct builddb sports5. Make a backup
probkup sports /some_dir/sports.bkpThat backup will run much faster since we excluded areas 8 to 11
Now we need to assemble our database back to what it was.
6. Move original .st file back
mv sports.st.save sports.st7. Then we need to fix time stamp for all extents that were not included in a backup.
dd if=sports_7.d1 of=sports_8.d1 bs=1024 count=1 skip=0 seek=0 conv=notrunc dd if=sports_7.d1 of=sports_9.d1 bs=1024 count=1 skip=0 seek=0 conv=notrunc dd if=sports_7.d1 of=sports_10.d1 bs=1024 count=1 skip=0 seek=0 conv=notrunc dd if=sports_7.d1 of=sports_11.d1 bs=1024 count=1 skip=0 seek=0 conv=notrunc8. Build the .db file again
rm sports.db prostrct builddb sports9. We assembled the original database back to what it was, so now we can start the database
proserve sports10. The backup made in step 5 could be restored using structure in step 3. The "shortened" database will work for tables in this case with Area 7 tables only
for each salesrep: display salesrep. end. for each invoice: display invoice. end.But it will fail (and it should fail) for tables in other areas that were not included in a backup.
for each customer: display customer. end.SYSTEM ERROR: Attempt to read block 12 which does not exist in area 9, database /some_dir2/sports. (210) (14684)
We do not have areas 8 to 11 so that is not a surprise that customer query errors out.