Active IQ Unified Manager Discussions

how to reinitialize the DFM database?

russ_witt
5,494 Views

I sometimes collect DFM databases from customers when analyzing their environments for upgrades or troubleshooting.  Now I would like to use this DFM install in my lab to monitor a set of machines so I cannot just restore another database over the current one because I havent got the new db yet.

Is there a way to restore the database to its virgin state without deinstalling and reinstalling DFM again?

Also I saw the commands to move databases around but there were no examples. Anyone have an example of command syntax that worked?

Thanks!

1 ACCEPTED SOLUTION

adaikkap
5,495 Views

I used to do this for my test setups.

dfm service stop.

move/delete monitor.db and log.

dfm services setup -l <use core license>

dfm service start.

Regards

adai

View solution in original post

6 REPLIES 6

sinhaa
5,495 Views

Hello russ.witt,

     The following command help gives an example to move your datstore to a new location.

[root@lnx186-91 ~]# dfm datastore setup help

NAME

    setup -- configure DataFabric Manager server data on a different location

SYNOPSIS

    dfm datastore setup [ -n ] [ -f ] { dfm-data-dir | [ -d dbDir ]

[ -l dbLogDir ] [ -p perfArchiveDir ]

[ -s scriptDir ] [ -r reportsArchiveDir ]

[ -P pluginsDir ] }

DESCRIPTION

    -n specifies that the data present at target location will be used

        without copying original data.

    -f specifies that the data should be deleted from target location if it is not empty.

    dfm-data-dir specifies DataFabric Manager server target root directory for data.

    -d specifies the new location for database data file.

    -l specifies the new location for database transaction log file.

    -p specifies the new location for perf data files.

    -s specifies the new location for script output data.

    -r specifies the new location for report archival data.

    -P specifies the new location for Storage System configuration plugins.

    Example: dfm datastore setup /opt/dfmdata/

             dfm datastore setup -d /opt/dfm/data/ -p /opt/dfm/perf/ -s /opt/dfm/script/.

[root@lnx186-91 ~]#

Now if you want to bring back your DFM into the original virgin state, no clean way to do it. But I think you can do it, if you have another another freshly installed dfm server ( or install a new one on a system and before adding aything to it copy its monitordb.db file to some safe location It could be useful for future as well.)

On your old dfm server:

Stop dfm services

delete the monitordb.db files from the data dir

copy the fresh monitordb.db files from the earlier safe location to here.

start dfm services.

Or also..

copy the fresh monitor.db in some new location /opt/newdfm/data or C:\NEW_DFM\data

do dfm datastore -n <new_location>

e.g.

dfm datastore -n C:\NEW_DFM

or

dfm datastore -n /opt/newdfm

-n option is important here. It specifies to use the new db and without copying the original one.

This unclean hack helped in saving time of uninstalling the dfm server at atleast, and can also help in future needs.

If anyone knows of a better approach, kindly post it.

warm regards,

Abhishek

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

smoot
5,495 Views

The command "dfm service setup sql" will create a new database. That's what the install process does internally.

I suggest creating a backup first.

The full sequence would be:

  $ dfm backup create pre-init-db

  $ dfm service stop

  $ rm /opt/NTAPdfm/data/monitordb.db /opt/NTAPdfm/data/monitordb.log

  $ dfm service setup sql

At this point it will ask you for your license key again so make sure you have that handy.

-- Pete

adaikkap
5,496 Views

I used to do this for my test setups.

dfm service stop.

move/delete monitor.db and log.

dfm services setup -l <use core license>

dfm service start.

Regards

adai

russ_witt
5,495 Views

Awesome Answers All!  Thanks!

sinhaa
5,495 Views

Hi Pete,

     Good post. dfm service help doesn't show  setup as any option for dfm service command. This I assume is a hidden command. right?

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

smoot
5,495 Views

Well, since it doesn't show in help then by definition, yes. But that doesn't mean it doesn't work, it's there as part of the install process and we use it all the time.

Public