Network and Storage Protocols

Copy configurations to another CDOT cluster

Rpstorage
5,825 Views

Is there any way to copy all the share information (cifs shares and export policies) to another cdot cluster?

Like we can copy the cifsconfig_share.cfg/exports files to another 7-mode filer. Same way i want to do it on CMODE. Please let me know. 

5 REPLIES 5

asulliva
5,812 Views

Hello @Rpstorage,

 

There are some PowerShell scripts for doing backup/restore of ONTAP shares and exports here.

 

Hope that helps!

 

Andrew

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

Rpstorage
5,787 Views

looks these scripts are working in within cluster vsms. I need to sollution for cluster to cluster. 

asulliva
5,781 Views

Exports/shares exist at the SVM level with clustered Data ONTAP, not the cluster level.  If you have more than one SVM, then you'll want to loop over them with some sort of map of old->new SVM names.

 

$source_cluster = 1.1.1.1
$source_username = "admin"
$source_password = "password"

$destination_cluster = 2.2.2.2
$destination_username = "admin"
$destination_password = "password"

# create a key value map of the SVMs
$svm_map = @{
    'old_svm_1' = 'new_svm_1';
    'old_svm_2' = 'new_svm_2';
}

# backup from source, restore to destination
$svm_map.GetEnumerator() | %{
    # backup source
    Write-Host "Outputing SVM $($_.Key) shares to XML"
    .\backupSharesAcls.ps1 `
        -server $source_cluster `
        -user $source_username `
        -password $source_password `
        -vserver $_.Key `
        -share * `
        -shareFile ".\$($_.Key)_shares.xml" `
        -aclFile ".\$($_.Key)_acls.xml" `
        -spit more

    # restore to destination
    Write-Host "Restoring SVM $($_.Key) shares to SVM $($_.Value)"
    .\restoreSharesAcls.ps1 `
        -server $destination_cluster `
        -user $destination_username `
        -password $destination_password `
        -vserver $_.Value `
        -shareFile ".\$($_.Key)_shares.xml" `
        -aclFile ".\$($_.Key)_acls.xml" `
        -spit more
}

 

Andrew

 

 

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

Rpstorage
5,775 Views

We are replicating all prod volumes to DR vsm. DR VSM is in different cluster. Now I am trying to create cifs shares/export rules on DR volume same as production.

asulliva
5,770 Views

The above script should work.  Alternatively, use SVM DR, which will handle all this for you.

 

Andrew

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