Deleted agent and wants to recreate agent without data being destroyed

Article:TECH190671  |  Created: 2012-06-08  |  Updated: 2012-07-31  |  Article URL http://www.symantec.com/docs/TECH190671
Article Type
Technical Solution


Environment

Issue



Customer deleted agent X and wants to be sure can recreate it without data being destroyed


Environment



PureDisk 6.6.1.2 EEB20 


Cause



Customer deleted agent by accident.  The desire was to deactivate the agent but it was deleted instead.

Need to re associate the data selection with the new agent

Note:  When deleting an agent, there is a pop up box warning indicating that all data will be deleted for this agent.  The box needs to be checked yes saying it is okay to proceed.   Be certain you really want to delete the data before saying ok/yes.


Solution



Disable all the Puredisk cleanup policies on the SPA. 

Log into the PureDisk Web UI

Locate and disable these policies:

Data removal (there may be multiple per data selection)
Data Selection Removal
MB Garbage Collection
CR Garbage Collection
CR Queue Processing

Disabling these policies will prevent the deleted agent's data from being removed.  They should be re-enabled once the data has been re associated with the deleted agent.

Re-registered the agent with a new agent ID
Do a backup of the agent and that backup was successful.
Would like to be able to restore the data from this agent when it was agent 52
Getting pdgetlogs output from the SPA
Getting the output of the database using this command. # /opt/pddb/bin/pg_dump -U pddb ca -f /Storage/tmp/ca.sql

To re associate the deleted agent ID 52's data selection data with the new agent ID 61 (same agent but new agent ID).
He has a backup from last night, but would like to re associate the previously backed up data with the new agent ID 61.

1. Install an agent in the GUI (This step is NOT needed if the agent is still present in the GUI). Use the GUI to EDIT the agent - note the AgentID.

2. Create a dataselection using the GUI to backup some folder (example /) for the agent. (The deleted dataselection will be re-attached to this agent and dataselection.)

3. Disable this new dataselection using the GUI - it will not be used for any further backups.

4. Identify the dataselection id that was just created. This can be done by clicking EDIT on the dataselection OR by immediately using this SQL query: 
    - Connect to the CA using:
         /opt/pddb/bin/psql -U pddb ca 

If prompted for a password, you can get it with the command:    

# grep -i dbpass /Storage/etc/topology.ini

If the topology.ini file is encrypted, you can decrypt/encrypt with:
# /opt/pdinstall/enc_topology.sh -d

To encrypt again:
# /opt/pdinstall/enc_topology.sh -e

    - Run the query:
         select id from dataselection order by id desc limit 1;

ASSUMPTION: From the check above, this document will assume the most recently created dataselection ID is 5.

5. List all the deleted dataselections by checking the contents of the 'deletedds' table on the SPA. 
    - Connect to the CA database using:
         /opt/pddb/bin/psql -U pddb ca
    - Run the query:
         select * from deletedds order by dsid; 

ASSUMPTION: From the query above, this document will assume the deleted dataselection ID (DSID) is 2. 

In this case the deleteadds was empty, meaning the PD cleanup policies ran and removed the data.

If the deleteadds shows the deleted dataselection information, follow the steps in TECH68600 to re associated it with the reinstalled agent.
 





Article URL http://www.symantec.com/docs/TECH190671


Terms of use for this information are found in Legal Notices