Delete db40\dcbf folder after migration to DP 8.x

If you migrate from a previous version to Data Protector A.08.00 or later on Windows, you might come across an issue where you’re unable to remove the old db40\dcbf directories using GUI or omnidbutil -remove_dcdir. This is most likely caused by the used path separator inside the Internal Database. Since version 8 the path separator is a simple / for UNIX and Windows platforms.

General requirements to remove a DCBF directory

  • No active DCBF file should point to this directory: Move any actively used DCBF files to a different DCBF directory and run omnidbutil -remap_dcdir
  • Don’t move any non-active DCBF files (most likely created due to an crash or similar) to a new db80 DCBF directory: Best way is to move the DCBFs to a temporary directory first, run omnidbcheck -bf and move back only DCBFs that are marked with as ERROR
  • Keep in mind that the DCBF name is related directly to the media id, just replace underscores (_) with colons (:) and strip away the last section: you can use omnimm -media_info 9ccb19ac:5350e998:555a:0298 to get details for DCBF 9ccb19ac_5350e998_555a_0298_22EA5053.dat

How to remove an empty DCBF directory with wrong path separator inside the IDB

The idea here is not to follow the instructions from http://support.openview.hp.com/selfsolve/document/KM00481540, since omnidbutil -writedb is not always possible and might be dangerous. I just created a simple SQL script that will change the wrong path separator and make regular removal possible.

C:\>omnidbutil  -list_dcdirs
Configured DC directories:
Allocation Sequence
|        Maximum Usage in MB
|        |        Maximum Number of Files in Directory
|        |        |        Minimum Free Space [MB]
|        |        |        |        Directory
|        |        |        |        |
===========================================================================
0        204800   100000   2048     O:/OmniBack/db40/dcbf
4        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf4
3        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf3
2        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf2
1        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf1
0        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf0
DONE!

C:\>notepad C:\temp\dcbf_dir_fix.sql
--Displays DCBF directories before modification
SELECT dcbf_directory from dp_catalog_dcbf_directory;
--Fixes wrong path separator for db40 DCBF directories on Windows CM
UPDATE dp_catalog_dcbf_directory SET dcbf_directory = replace(dcbf_directory, '\', '/');
UPDATE dp_catalog_dcbf_directory SET dcbf_directory = replace(dcbf_directory, '\\', '/');
--Displays DCBF directories after change
SELECT dcbf_directory from dp_catalog_dcbf_directory;

C:\>omnidbutil -run_script C:\temp\dcbf_dir_fix.sql -detail
           dcbf_directory
------------------------------------
 O:\OmniBack\db40\dcbf
 O:/OmniBack/server/db80/dcbf/dcbf4
 O:/OmniBack/server/db80/dcbf/dcbf3
 O:/OmniBack/server/db80/dcbf/dcbf2
 O:/OmniBack/server/db80/dcbf/dcbf1
 O:/OmniBack/server/db80/dcbf/dcbf0
(6 rows)
 
UPDATE 6
UPDATE 6
           dcbf_directory
------------------------------------
 O:/OmniBack/db40/dcbf
 O:/OmniBack/server/db80/dcbf/dcbf4
 O:/OmniBack/server/db80/dcbf/dcbf3
 O:/OmniBack/server/db80/dcbf/dcbf2
 O:/OmniBack/server/db80/dcbf/dcbf1
 O:/OmniBack/server/db80/dcbf/dcbf0
(6 rows)
DONE!

C:\>omnidbutil -remove_dcdir O:/OmniBack/db40/dcbf
DONE!

C:\>omnidbutil  -list_dcdirs
Configured DC directories:
 Allocation Sequence
 |        Maximum Usage in MB
 |        |        Maximum Number of Files in Directory
 |        |        |        Minimum Free Space [MB]
 |        |        |        |        Directory
 |        |        |        |        |
===========================================================================
 4        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf4
 3        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf3
 2        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf2
 1        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf1
 0        204800   100000   2048     O:/OmniBack/server/db80/dcbf/dcbf0
DONE!

Leave a Reply