DX Unified Infrastructure Management

  • 1.  Scheduled file transfer from hub

    Posted Mar 25, 2019 06:03 AM

    I need to get a file off a hub on a regular basis and up until now I have been using copy between RDP sessions or Dr Nimbus to do the copy. I was wondering if it was possible to automate and possibly schedule the copy of the file from one hub to another?

     

    I would appreciate any suggestions.

    Thank you



  • 2.  Re: Scheduled file transfer from hub

    Posted Mar 25, 2019 01:47 PM

    You can do this in Lua with something like:

     

    local mypds = pds.create()

    pds.putString ( mypds, "directory", "/tmp")
    pds.putString ( mypds, "file", "file.txt" )
    pds.putInt ( mypds, "buffer_size", 10240000 )

    output,return_status = nimbus.request ( "/domain/hub/robot/controller", "text_file_get", mypds )
    print( output["file_content"] )

     

    Make the obvious adjustments for your environment.

     

    Garin