To replicate all nodes except node3:
server1> q fscounts * server1> def stgrule repl-2-server2 server2 actiontype=replicate server1> def substgrule repl-2-server2 repl-2-server2-sub1 node3 actiontype=norepl server1> q substgrule repl-2-server2 f=d server1> q stgrule repl-2-server2 server1> start stgrule repl-2-server2
To replicate only specific nodes, or filespaces
server1> q fscounts * server1> def stgrule repl-2-server3 server3 actiontype=norepl server1> def substgrule repl-2-server3 repl-2-server3-sub1 node3 actiontype=repl server1> def substgrule repl-2-server3 repl-2-server3-sub2 node2 actiontype=repl filespace=/data2 server1> q substgrule repl-2-server3 f=d server1> q stgrule repl-2-server3 server1> start stgrule repl-2-server3
server1> audit container stgpool=container1 server1> q damage container1 server1> repair stgpool container1 server2
Then check activity log for status
server1> q act server1> q damage container1
On the TSM server, your are able to replicate nodes between 2 TSM server (OS independant, use full to migrate another plateform), datas and definition. You can select the data type (archive, backup, active backup…) and also which filespace you want to replicate. It's an IP replication.
It can be usefull to backup on the first TSM server, and after the replication, you can for example restore the datas directly from the second TSM server. Also useful for critical database servers with archive logs enable, which needs to be regularly backup it logs.
Here you 'll find the steps to establish a node replication between 2 TSM servers, in my case the 2 TSM are on the same machine.
On the first TSM server (TSMPROD) set parameters:
[eco-aix61@root] /root> dsmadmc -id=admin -pass=xxxx -optfile=/usr/tivoli/tsm/client/ba/bin/dsm_prod.opt tsm: TSMPROD> set serverpassword admin tsm: TSMPROD> set serverhladdress 192.168.20.7 tsm: TSMPROD> set serverlladdress 1500 tsm: TSMPROD> set crossdefine on tsm: TSMPROD> q status Storage Management Server for AIX - Version 6, Release 3, Level 0.0 Server Name: TSMPROD Server host name or IP address: 192.168.20.7 Server TCP/IP port number: 1500 Crossdefine: On Server Password Set: Yes ........... tsm: TSMPROD> quit
On the second TSM server (TSMBKP) set parameters:
[eco-aix61@root] /root> dsmadmc -id=admin -pass=xxxx -optfile=/usr/tivoli/tsm/client/ba/bin/dsm_bkp.opt tsm: TSMBKP> set serverpassword admin tsm: TSMBKP> set serverhladdress 192.168.20.7 tsm: TSMBKP> set serverlladdress 1600 tsm: TSMBKP> set crossdefine on tsm: TSMBKP> q status Storage Management Server for AIX - Version 6, Release 3, Level 0.0 Server Name: TSMBKP Server host name or IP address: 192.168.20.7 Server TCP/IP port number: 1600 Crossdefine: On Server Password Set: Yes ........... tsm: TSMBKP> quit
Establish a server to server communication (from TSMPROD):
[eco-aix61@root] /root> dsmadmc -id=admin -pass=xxxx -optfile=/usr/tivoli/tsm/client/ba/bin/dsm_prod.opt tsm: TSMPROD> define server tsmbkp hladdress=192.168.20.7 lladdress=1600 serverpassword=admin crossdefine=yes ssl=no tsm: TSMPROD> set replserver tsmbkp 12/06/11 15:33:09 ANR1634I Default replication server name set to TSMBKP. tsm: TSMPROD>q status Storage Management Server for AIX - Version 6, Release 3, Level 0.0 Server Name: TSMPROD ....................... Outbound Replication: Enabled Target Replication Server: TSMBKP Default Replication Rule for Archive: ALL_DATA Default Replication Rule for Backup: ALL_DATA Default Replication Rule for Space Management: ALL_DATA Replication Record Retention Period: 30 Day(s)
Now we are ready to start a node replication of one node (eco-aix61) from TSMPROD to TSMBKP:
[eco-aix61@root] /root> dsmadmc -id=admin -pass=xxxx -optfile=/usr/tivoli/tsm/client/ba/bin/dsm_prod.opt tsm: TSMPROD> update node eco-aix61 replstate=enabled tsm: TSMPROD> replicate node eco-aix61 prev=no 12/06/11 15:50:28 ANR0984I Process 4 for Replicate Node started in the BACKGROUND at 15:50:28. (SESSION: 15, PROCESS: 4) 12/06/11 15:50:28 ANR2110I REPLICATE NODE started as process 4. (SESSION: 15, PROCESS: 4) 12/06/11 15:50:28 ANR0408I Session 17 started for server TSMBKP (AIX) (Tcp/Ip) for replication. (SESSION: 15, PROCESS: 4) 12/06/11 15:50:28 ANR0409I Session 17 ended for server TSMBKP (AIX). (SESSION: 15, PROCESS: 4) 12/06/11 15:50:28 ANR0408I Session 18 started for server TSMBKP (AIX) (Tcp/Ip) for replication. (SESSION: 15, PROCESS: 4) 12/06/11 15:50:29 ANR0409I Session 18 ended for server TSMBKP (AIX). (SESSION: 15, PROCESS: 4) ................ 12/06/11 15:50:33 ANR0409I Session 33 ended for server TSMBKP (AIX). (SESSION: 15, PROCESS: 4) 12/06/11 15:50:33 ANR0409I Session 32 ended for server TSMBKP (AIX). (SESSION: 15, PROCESS: 4) 12/06/11 15:50:33 ANR0409I Session 30 ended for server TSMBKP (AIX). (SESSION: 15, PROCESS: 4) 12/06/11 15:50:33 ANR0409I Session 31 ended for server TSMBKP (AIX). (SESSION: 15, PROCESS: 4) 12/06/11 15:50:33 ANR0328I Replication preview of node(s) ECO-AIX61 completed. Files current: 0. Files to be replicated: 620. Files to be updated: 0. Files to be deleted: 0. Amount to replicated: 12,561 KB. Estimated run time: 0 Day(s), 0 Hour(s), 1 Minute(s). (SESSION: 15, PROCESS: 4) 12/06/11 15:50:33 ANR0986I Process 4 for Replicate Node running in the BACKGROUND processed 620 items for a total of 12,862,604 bytes with a completion state of SUCCESS at 15:50:33. (SESSION: 15, PROCESS: 4) tsm: TSMPROD>q replnode eco-aix61 Node Name Type Filespace Name FSID Files on Replication Files on Server Server (1) Server (1) --------------- ---- --------------- ---- ---------- --------------- ---------- ECO-AIX61 Bkup /home 4 5 TSMBKP 5 ECO-AIX61 Bkup /var 5 233 TSMBKP 233
Now you can create an administrative schedule to daily replicate nodes.
You can use NODEGROUP to group all nodes that requires replication: Ex:
define NODEGROUP myreplnodes define NODEGROUPMEMBER myreplnodes node1 upd node node1 replstate=enabled replicate node myreplnodes
You can check all replication commands, for example:
tsm: TSMPROD>QUERY REPLRULE Replication Rule Name Target Replication Server Active Enabled Only ------------------------------ ------------------------------ ---------- ---------- ACTIVE_DATA TSMBKP Yes Yes ACTIVE_DATA_HIGH_PRIORITY TSMBKP Yes Yes ALL_DATA TSMBKP No Yes ALL_DATA_HIGH_PRIORITY TSMBKP No Yes ANR1999I QUERY REPLRULE completed successfully.
.-,-----------------------. V | >>-REPLicate Node------+-node_name-------+---+------------------> '-node_group_name-'
.-*-------------------------------. >--+---------------------------------+--------------------------> | .-,------------------. | | (1) V | | '------+-----filespace_name---+-+-' | .-,-------------. | | V (2) | | '-----FSID--------+------'
.-NAMEType--=--SERVER--------. >--+----------------------------+-------------------------------> '-NAMEType--=--+-SERVER----+-' +-UNIcode---+ | (2) | '-FSID------'
.-CODEType--=--BOTH-----------. >--+-----------------------------+------------------------------> '-CODEType--=--+-BOTH-------+-' +-UNIcode----+ '-NONUNIcode-'
.-DATAtype--=--ALl------------------. >--+-----------------------------------+------------------------> | .-,----------------. | | V | | '-DATAtype--=----+-ALl----------+-+-' +-BACKUP-------+ +-BACKUPActive-+ +-ARCHive------+ '-SPACEManaged-'
.-PRIORITY--=--ALL--------. >--+-------------------------+----------------------------------> '-PRIORITY--=--+-ALL----+-' +-HIGH---+ '-NORMAL-'
.-MAXSESSions--=--10------------------. >--+-------------------------------------+----------------------> '-MAXSESSions--=----number_sessions---'
.-Preview--=--No---------------------------------. >--+------------------------------------------------+-----------> '-Preview--=--+-No-----------------------------+-' | .-LISTfiles--=--No------. | '-Yes--+-----------------------+-' '-LISTfiles--=--+-No--+-' '-Yes-'
.-Wait--=--No------. >--+------------------+---------------------------------------->< '-Wait--=--+-No--+-' '-Yes-'
tsm: TSM01>QUERY REPLSERVER Replication Globally Unique ID: 1e.4a.a1.76.85.35.e1.11.b3.37.00.50.56.c6.d0.e9 Server Name: TSM01 Last Replication: Heartbeat: Failover High Level Address: Failover TCP Port Number: 1500 Failover SSL Port Number: Deletion in Progress: No Dissimilar Policies: Replication Globally Unique ID: 32.d6.39.b5.e0.ce.e3.11.a1.6e.00.50.56.b1.59.52 Server Name: TSM02 Last Replication: 06/06/16 02:34:00 Heartbeat: 06/06/16 12:15:04 Failover High Level Address: Failover TCP Port Number: 1500 Failover SSL Port Number: Deletion in Progress: No Dissimilar Policies: Off tsm: TSM01>QUERY REPLRULE Replication Rule Name Target Replication Server Active Enabled Only ------------------------------ ------------------------------ ---------- ---------- ACTIVE_DATA TSM02 Yes Yes ACTIVE_DATA_HIGH_PRIORITY TSM02 Yes Yes ALL_DATA TSM02 No Yes ALL_DATA_HIGH_PRIORITY TSM02 No Yes ANR1999I QUERY REPLRULE completed successfully.
(Node does not exist yet on Target Server.)
Use the register/update Node commands on source server, specifying REPLSTATE parameter but not the REPLMODE parameter
REPLMODE automatically set to SEND on source server node
When replication first occurs, a node will be defined on the target server with REPLSTATE set to RECEIVE
(Node does exist on Target Server and Import/Export has been used to import some data to the target server)
On source server, issue update node command with REPLSTATE=ENABLED and REPLMODE=SYNCSEND
On target server, issue update node command with REPLSTATE=ENABLED and REPLMODE=SYNCRECEIVE
After first replication occurs, REPLMODE will be set to SEND on source server and REPLMODE will be set to RECEIVE on target server.
tsm: TSM01>q node NODE01 f=d Node Name: NODE01 Platform: (?) Client OS Level: (?) Client Version: (?) ... Node Groups: ... Replication State: None Replication Mode: None Backup Replication Rule: DEFAULT Archive Replication Rule: DEFAULT Space Management Replication Rule: DEFAULT Replication Primary Server: Last Replicated to Server:
A node replication process fails with the ANR0332E error.
Symptom
Examine the source server activity log. The following error would be logged :
ANR0332E Replication mode Send of node NODE1 is incompatible with mode None on server Target_server.
Cause
The replicated node exists on the target system and the REPLMODE=NONE option is used.
Resolving the problem
There are 2 ways to resolve this issue.
Option 1: remove NODE1 from the replication group and when replication runs it will not replicate this node.
Option2: remove NODE1 on target server so that when the replication runs, it will recreate the mode with proper setting. The following steps are required.
Check replication status for all nodes and filespaces:
tsm: TSM01>q repli * Node Name Filespace Name FSID Start Time End Time Status Phase ---------- -------------- ---- ------------------- ------------------- --------- ----------- LNXREP01 /boot 1 03/01/2017 10:50:36 03/01/2017 10:54:36 Ended None LNXREP01 / 2 03/01/2017 10:50:36 Running Replicating .........
Check all filespaces synchronized or not:
tsm: TSM01>q repln * Node Name Type Filespace FSID Files on Replication Files on Name Server Server (1) Server(1) ------------ ---- ----------- ---- ---------- --------------- ---------- LNXREP01 Bkup / 2 83 891 TSM02 72 257 LNXREP01 Bkup /boot 1 333 TSM02 333 ...
Check amount of data to synchronize for a specific node:
tsm: TSM01> repl node LNXREP01 prev=yes ANR2110I REPLICATE NODE started as process 519. ANS8003I Process number 519 started. tsm: TIPRTSM01>q act begint=-00:01 Date/Time Message -------------------- ---------------------------------------------------------- 03/01/2017 11:23:44 ANR0328I Replication preview of node(s) LNXREP01 completed. Files current: 142,686. Files to be replicated: 10. Files to be updated: 20. Files to be deleted: 435. Amount to replicated: 0 bytes. Estimated run time: 0 Days, 0 Hours, 1 Minutes. (SESSION: 470605, PROCESS: 519) 03/01/2017 11:23:44 ANR0987I Process 519 for Replicate Node - Preview running in the BACKGROUND processed 142,686 items with a completion state of SUCCESS at 11:23:44 AM. (SESSION: 470605, PROCESS: 519)
ANR1633E REMOVE NODE: Node HRSRXPHI01 is set up for replication and cannot be renamed or removed.
Use the following commands to first disable replication and then remove the node
Protect: TSM01> REMOVE REPLNODE RMAN01 ANR1631I REMOVE REPLNODE: Replication state information for the specified nodes have been removed. Protect: TSM01> remove node RMAN01 ANR2061I Node RMAN01 removed from policy domain RMANDB.
Check which node is in failure
Protect: TSM01> QUERY REPLFAILURES
Protect: TSM01>q repln DWPR00 Node Name Type Filespace Name FSID Files on Replication Files on Server Server (1) Server (1) --------------- ---- --------------- ---- ---------- --------------- ---------- DWPR00 Bkup /adsmorc 1 1,196 TSM02 2,186
On source server
Protect: TSM01>REPLICATE NODE DWPR00 FORCEREConcile=full
On target, wait until replication is finished, and expire
Protect: TSM01>expire inv node=DWPR00
Now OK
Protect: TSM01>q repln DWPR00 Node Name Type Filespace Name FSID Files on Replication Files on Server Server (1) Server (1) --------------- ---- --------------- ---- ---------- --------------- ---------- DWPR00 Bkup /adsmorc 1 1,196 TSM02 1,196
You can also use the following query which should give an empty output
select FSNAME,TOTFILES_TO_REPLICATE,TOTFILES_REPLICATED from replicationview where TOTFILES_TO_REPLICATE<>TOTFILES_REPLATED