Code Monkey home page Code Monkey logo

datacenterdudes / cdot-cifs-share-backup-restore Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 9.0 16 KB

These PowerShell scripts allow storage administrators to back up and restore CIFS share configurations for storage virtual machines in NetApp's clustered Data ONTAP. These require the NetApp PowerShell Toolkit module to be installed. These scripts are not officially supported by NetApp (but the PowerShell modules are) and should be used only with thorough testing.

PowerShell 100.00%

cdot-cifs-share-backup-restore's People

Contributors

alpinecoder avatar lance36 avatar scottharney avatar whyistheinternetbroken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cdot-cifs-share-backup-restore's Issues

Restore of combined nfs/cifs export-policy rules doesn't work

Restoring export-policy rules with more than one protocol fails because of the double-quotes in the cmd string. It seams to be the same issue as in the symlink settings of an cifs share. This code fixed it for me:

$myProtocol = $_.Protocol
   
    if (($myProtocol -ne $null) -and ($myruleProtocol -ne ""))
    {
        $myProto = ""
        foreach ($prop in $myProtocol) {
            if ($myProto -eq "")
            {
                $myProto = $prop
            } 
            else
            {
                $myProto = $myProto , $prop -join ','
            }
        }
        $mycmd = $mycmd + " -Protocol $myProto"          
    }

Error during execution of restoreshares.acls.ps1

Hi there, I get this error:

PS C:> .\restoreSharesAcls.ps1
Specificare un'espressione di valore sul lato destro dell'operatore '-'.
In C:\restoreSharesAcls.ps1:114 car:30

  •     $mycmd = $mycmd + " - <<<< mySymlinkProperties ""$mySymlinkProp"""
    
    • CategoryInfo : ParserError: (:) [], ParseException
    • FullyQualifiedErrorId : ExpectedValueExpression

Can you please set me on the right course to find a solution?

Best regards, Stefano

filename changes and functions reversed

Original post at datacenterdude.com names these getSharesAcls.ps1 and createSharesAcls.ps1 . However the names are changed herein to backupSharesAcls.ps1 and restoreSharesAcls.ps1 which would be fine except the script actions are reversed. The backupSharesAcls.ps is actually the restore script and vice-versa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.