#`/storage/file/copy` completes as 'successful' with nothing done

1 messages · Page 1 of 1 (latest)

rose bloom
#
{
  "files_to_copy": [
    {
      "destination": {
        "svm": {
          "name": "SVM"
        },
        "path": "volB-DC1",
        "volume": "volB"
      },
      "source": {
        "svm": {
          "name": "SVM"
        },
        "path": "volA-DC1",
        "volume": {
          "name": "volA"
        }
      }
    }
  ]
}

https://SVM.demo.netapp.com/api/storage/file/copy

PS /> $job.job.uuid                
8c645288-f1fa-11ee-a2e0-00a098f25937
PS /> Get-NcJob -Uuid $job.job.uuid | fl

IsRestarted              : 
JobAffinity              : 
JobCategory              : 
JobCompletion            : success
JobDescription           : POST /api/storage/file/copy
JobDropdeadTime          : 
JobDropdeadTimeDT        : 
JobEndTime               : 1712176889
JobEndTimeDT             : 4/3/2024 8:41:29 PM
JobId                    : 
JobName                  : 
JobNode                  : 
JobPriority              : 
JobProcess               : 
JobProgress              : success
JobQueueTime             : 
JobQueueTimeDT           : 
JobSchedule              : 
JobStartTime             : 1712176889
JobStartTimeDT           : 4/3/2024 8:41:29 PM
JobState                 : success
JobStatusCode            : 0
JobType                  : 
JobUsername              : 
JobUuid                  : 8c645288-f1fa-11ee-a2e0-00a098f25937
JobVserver               : SVM
NcController             : SVM.lod.netapp.com
Error                    : 
Svm                      : DataONTAP.C.Types.RestAttributes.Svm
JobNodeName              : 
IsRestartedSpecified     : False
JobDropdeadTimeSpecified : False
JobEndTimeSpecified      : True
JobIdSpecified           : False
JobQueueTimeSpecified    : False
JobStartTimeSpecified    : True
JobStatusCodeSpecified   : True


PS />
#

I was going to fail back to private CLI as according to the docs here:
https://docs.netapp.com/us-en/ontap-restapi-9131//ontap/post-storage-file-copy.html

The CLI would be​: 
volume file copy start

In a lab environment, I discovered that the command is diag-privilege which my users will not get:

cluster1::> volume file copy start ?

Error: "copy" is not a recognized command

cluster1::> set diagnostic

Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

cluster1::*> volume file copy start ?
   [-source-paths|-S] <[vserver:]volume/path/filename>, ...       *Source Paths
   [-destination-paths|-D] <[vserver:]volume/path/filename>, ...  *Destination Paths
  [[-reference-path|-R] <[vserver:]volume/path/filename>]         *Source Reference File Path
  [ -max-cutover-time <integer> ]                                 *Maximum Cut Over Time (Secs)
  [ -reference-max-cutover-time <integer> ]                       *Maximum Cut Over Time for Reference File (Secs)
  [ -max-throughput {<integer>[KB|MB|GB|TB|PB]} ]                 *Maximum Scanner Speed
  [ -scanner-paused {true|false} ]                                *Scanner Paused
  [ -report-completed {true|false} ]                              *Report Completed Status (120 secs) (default: true)
  [ -hold-quiescence {true|false} ]                               *Hold Quiescence
  [ -realignment-amount {<integer>[KB|MB|GB|TB|PB]} ]             *Realignment Amount
  [ -enable-vdisk-realignment-plugin {true|false} ]               *Enable Vdisk Realignment Plugin

cluster1::*>

So CLI over REST isn't an option. Any other options here?

#

Also, ONTAP 9.13.1

worldly oasis
#

@rose bloom maybe you already know this and it doesn't help you because your clients don't have enough permissions, but for what it's worth, via REST private CLI, you can set diagnostic and call a CLI command. Haven't tried it with your example above but have done that for other commands