Do you have any suggestions on how APM backup can be automated? like Smatstor,postgres DB, management modules etc?
Each element will depend on your tolerance for loss.
1. Items that should be in a source control system:
2. Items that are created or modified by either a GUI or an installer
These items would be your <em_home>/config directory which would also include your <em_home>/config/module which are your management modules. Depending on your tolerance, you should back these up so, every day, week or month depending on how many changes you have done and if you can reproduce them.
3. Monitoring Data
There are two camps to backing up monitoring data, those who feel they need it and those who know that monitoring data is only useful for a fairly brief time.
If you have need/requirement to back up the monitoring data, there are several directories you will need to grab
Now each of these can be redirected and are noted within your <em_home>/config/IntroscopeEnterpriseManager.properties file.
You would need to capture all three for each of your enterprise managers. After you have it backed up, you will need a plan to restore and backed-up data have ages, which the reperiodization will run typically every night to move data around the three data tiers. If you are restoring, install the enterprise manager, then set the age times way out for the first tier, find the information you need then delete the enterprise manager.
If the monitoring data is the least of your problems during a major system failure, and you have lost one or more enterprise managers. Either restore a system snapshot (weekly, monthly) or install a new enterprise manager (collector) and configure the MOM to start sending agents to the new agent. The second case basically writes off any of the monitoring data that was lost.
In any of the cases, don't try copy or restore an enterprise manager when the enterprise manager is running.
Hope this helps,
. If you are an APM Admin or customer, we would like to hear from you on what you are doing daily in this area.
Thanks in advance
Totally forgot about the APM DB
If you are using CEM, the then the APM DB is pretty important so if you have discovered or defined business transactions then take a weekly backup. If you typically have a lot of transactions discoveries, then daily. You can lookup in the installation guide how to do a PostgreSQL export and restore.
If you are using Oracle, talk to your Oracle DBA on getting the data backed up.
If you are not using CEM, about the only data in the APM DB are the vertices for Team Center. This data will rebuild over time if it totally lost, but if you have a requirement to maintain this data, then do a APM DB back up. The frequency will depend on your business, be it nightly, weekly or monthly or never.
I think there is a export option on the TIM, but it has been so long since we had a TIM I don't remember if it does or not. Much like the APM on source control files, if you installed server certificates into the TIM, you should have those backed up along with a secure password store.
Along that line, any sort of generated or installed files such as SSL certificates should be kept in source control if they are the public keys. If they are the private keys...well you need to hide them away or hopefully the department that generated or purchased them have back ups on them.
For automating the backing up of APM Postgres database, one idea is to use a cron job to run the APM database backup script:
The following example generates a cemdb.backup file in the /opt/database/backups directory:
sh dbbackup-postgres.sh 127.0.0.1 /opt/database cemdb admin quality 5432 ./backups
Thanks everyone for the reply.
I understand that, for APM DB , I can use a cronjob. And EM need not be stopped.
But to backup Smartstor, EM needs to be stopped first and then copy the data folder. How this can be automated?
There is no one script to automate that, but what you can do is create a script to call <EM_HOME>/bin/EMCtrl.sh stop
After that comes back, then you can issue the copy command to copy the data folder.
Once that is done, an optional step would be to add <EM_HOME>/bin/EMCtrl.sh start to automatically start the EM.
Retrieving data ...