cancel
Showing results for 
Search instead for 
Did you mean: 

NBU appliance 5220 - access to script output

rookie11
Moderator
Moderator
   VIP   

Hi Folks

I ran few scripts on my nbu appliance and output saved at location /home/maintenance/tmp . there are close to around 6 files with output saved in them.

Please tell me various methods in details by which I can save these files on my laptop for further analysis and add them in presentation.

1 ACCEPTED SOLUTION

Accepted Solutions

sdo
Moderator
Moderator
Partner    VIP    Certified

...updates...

Method 5 - on *n*x admin host copy files from appliance NFS export
------------------------------------------------------------------
...on appliance:
     Manage > Software > Share Open

...on *n*x admin host:
     cd ~
     mkdir incoming
     mount -t nfs m.m.m.m:/inst/patch/incoming ${PWD}/incoming
! I could't get this to work from my Mac...
! ...but it did work from another SuSE host...

...copy files:
     cd wherever
     cp blah ${PWD}/incoming

...when finished...

...on *n*x admin host:
     umount -t nfs ${PWD}/incoming

...on appliance:
     Manage > Software > Share Close
Method 6 - on appliance copy files to NFS export on Windows 2008 R2 SP1 admin host
----------------------------------------------------------------------------------
...on Windows 2008 R2 SP1 admin host:
     FYI - you only need to do this sub-section once...
     ...to install NFS Service for Windows...
     Server Manager, Roles, Add Role, File Services, File Server and Services for Network File System
     reboot the Windows 2008 R2 SP1 admin host
     run Windows Update several times, until no more patches are installed
(...watch out - make sure Internet Explorer 11 is not auto-select, unless of course you want it...)
     reboot the Windows 2008 R2 SP1 admin host

...create a target folder:
     cd /d %homedrive%%homepath%
     mkdir myexport
     explorer %cd%

...right click the 'myexport' folder, select Properties...
     select  NFS Sharing tab...
     click   Manage NFS Sharing...
     tick    Share this folder
     click   Permissions
     change  ALL MACHINES access to No Access
     add     m.m.m.m (i.e. the IP address of appliance), read-write, allow root
     click   OK
     click   OK
     click   Apply
     click   OK
     click   Close
     (...the folder itself does not need everyone:full or authenticated-users:full)

...on appliance:
     Manage > Mountpoints
          Mount a.a.a.a:/myexport /mnt/remote/myexport nfs

...copy files:
     Support > Maintenance > Elevate
     cd wherever
     cp blah /mnt/remote/myexport

...when finished...

...on appliance:
     Manage > Mountpoints
          Unmount /mnt/remote/myexport

...on Windows 2008 R2 SP1 admin host:
...right click the 'myexport' folder, select Properties...
     select   NFS Sharing tab...
     click    Manage NFS Sharing...
     un-tick  Share this folder
     click    Apply
     click    OK
     click    Close


[end]

View solution in original post

10 REPLIES 10

SymTerry
Level 6
Employee Accredited

Hello

The supported way to do this is to Create a NetBackupCLI user (Manage > NetBackupCLI > Create username), SSH to the appliance as the NetBackupCLI user ,run your script, output it to /home/nbusers, then you can use WinSCP to connect to the appliance as the NetBackupCLI user and copy it off.

You shouldn't be running anything as root as that's unsupported by Symantec.

 

Sulivan77
Level 4

SymTerry is technically correct.. the best kind of correct.  But if it were me and it was a static job on say a linux box I had and wanted to have files automatically drop another system.  I would do one of two things.  

1 if the target box was static.  I would make a dir in /mnt and then use the mount command to do a cifs connect to the target box.  Then I wouldhave my script drop the files in the /mnt/<dirname> directory.

 

2 if the target box isn't static meaning its only online when you are online I would launch python from the tmp dir and then use a web browser to download the file.  

cd to /tmp

excute the following

python -m SimpleHTTPServer 8000

This opens a web server on port 8000 that the root of the server is /tmp.. 

ipaddress:8000 in your web browswer, click the files you want to download.

Kill the python server with control c  and be on your merry way..  

 

Now these are if I had a linux server.  And are not supported by symantec.. nope... not supported. ;)

 

Sully

V4
Level 6
Partner Accredited

copy it in directory where you would generally put patches for appliance and simply open share from CLISH... map share as drive to your laptop

copy files or move from them to your laptop 

close share

 

rookie11
Moderator
Moderator
   VIP   

@ SYMTerry : followed all steps mentioned by u. But still could not connect. 

after sharing user id n passwrd. WINSCP statrts session but unable to connect.

 

plz help 

V4
Level 6
Partner Accredited

rookie... did you tried steps which i posted earlier?
 

instead of patches you may try keeping copy of those output to logs directory which is also accessible through CIFS share (you have to open share for this within CLISH)

Juliano_Moreira
Level 4

it's weird, it seems my appliance does not have this directory, I need to create and make the collection be generated? see the picture

SymTerry
Level 6
Employee Accredited

Did you rename /admin/.bashrc? That should allow you to winscp to the applaince.

After you are done please make sure to rename it back, else you will not be able to access the CLISH. TECH209424

sdo
Moderator
Moderator
Partner    VIP    Certified

I liked the python example, Mr Sully.

sdo
Moderator
Moderator
Partner    VIP    Certified

...updates...

Method 5 - on *n*x admin host copy files from appliance NFS export
------------------------------------------------------------------
...on appliance:
     Manage > Software > Share Open

...on *n*x admin host:
     cd ~
     mkdir incoming
     mount -t nfs m.m.m.m:/inst/patch/incoming ${PWD}/incoming
! I could't get this to work from my Mac...
! ...but it did work from another SuSE host...

...copy files:
     cd wherever
     cp blah ${PWD}/incoming

...when finished...

...on *n*x admin host:
     umount -t nfs ${PWD}/incoming

...on appliance:
     Manage > Software > Share Close
Method 6 - on appliance copy files to NFS export on Windows 2008 R2 SP1 admin host
----------------------------------------------------------------------------------
...on Windows 2008 R2 SP1 admin host:
     FYI - you only need to do this sub-section once...
     ...to install NFS Service for Windows...
     Server Manager, Roles, Add Role, File Services, File Server and Services for Network File System
     reboot the Windows 2008 R2 SP1 admin host
     run Windows Update several times, until no more patches are installed
(...watch out - make sure Internet Explorer 11 is not auto-select, unless of course you want it...)
     reboot the Windows 2008 R2 SP1 admin host

...create a target folder:
     cd /d %homedrive%%homepath%
     mkdir myexport
     explorer %cd%

...right click the 'myexport' folder, select Properties...
     select  NFS Sharing tab...
     click   Manage NFS Sharing...
     tick    Share this folder
     click   Permissions
     change  ALL MACHINES access to No Access
     add     m.m.m.m (i.e. the IP address of appliance), read-write, allow root
     click   OK
     click   OK
     click   Apply
     click   OK
     click   Close
     (...the folder itself does not need everyone:full or authenticated-users:full)

...on appliance:
     Manage > Mountpoints
          Mount a.a.a.a:/myexport /mnt/remote/myexport nfs

...copy files:
     Support > Maintenance > Elevate
     cd wherever
     cp blah /mnt/remote/myexport

...when finished...

...on appliance:
     Manage > Mountpoints
          Unmount /mnt/remote/myexport

...on Windows 2008 R2 SP1 admin host:
...right click the 'myexport' folder, select Properties...
     select   NFS Sharing tab...
     click    Manage NFS Sharing...
     un-tick  Share this folder
     click    Apply
     click    OK
     click    Close


[end]

sdo
Moderator
Moderator
Partner    VIP    Certified

Thought I'd have a go at the various methods - thanks for all the previous posts...

...here's my attempt at some examples...

 
FYI - in these examples:
     a.a.a.a   is the IP address of the admin host, your workstation, or the server that you want to get the log files to
     m.m.m.m   is the IP address of the master or media server appliance that you are trying to get the logs from


Method 1 - scp
--------------
...on appliance:
     Manage > NetBackupCLI > Create myadmin

...on *n*x admin host:
     cd ~

...on Windows admin host:
     cd /d %homedrive%%homepath%

...copy files:
     [p][win]scp myadmin@m.m.m.m:/usr/openv/netbackup/logs/blah/mmddyy_NNNNN.log ./
Method 2 - simple web server on appliance
-----------------------------------------
...on appliance:
     Support > Maintenance > Elevate

     cd /log

     python -m SimpleHTTPServer 8000

...on Windows admin host:
     start "" iexplore http://m.m.m.m:8000/

...on *n*x admin host:
     ...use web browser to http://m.m.m.m:8000/

...browse to, and right click on file that you want to save as...

...when finished...

...on appliance:
     kill the python web server with Ctrl-C
Method 3 - copy from appliance to share on Windows admin host
-------------------------------------------------------------
...on Windows admin host:
     cd /d %homedrive%%homepath%
     mkdir myshare
     net share
     net share myshare=%homedrive%%homepath%\myshare /grant:administrator,full
     net share myshare

...on appliance:
     Support > Maintenance > Elevate

     mkdir /mnt/myshare

     mount -t cifs -l
     mount -t cifs a.a.a.a:\myshare /mnt/myshare -o user=administrator,password=****
! FYI **** = password of administrator account on admin host
     mount -t cifs -l

...copy log files:
     cp files /mnt/myshare/

...when finished...

...on appliance:
     mount   -t cifs -l
     unmount -t cifs /mnt/myshare
     mount   -t cifs -l

...on Windows admin host:
     net share
     net share myshare /delete
     net share
Method 4 - on Windows admin host copy from appliance SMB/CIFS share
-------------------------------------------------------------------
...on appliance:
     Manage > Software > Share Open

...on Windows admin host:
     net use
     net use m: \\m.m.m.m\inst\patch\incoming **** /user:admin
! FYI **** = password of admin account of appliance
     net use

...on appliance:
     Support > Maintenance > Elevate
     cp files /inst/patch/incoming

...on Windows admin host:
     start "" explorer m:\

...and copy files out...

...when finished...
...on Windows admin host:
     net use m: /delete

...on appliance:
     Manage > Software > Share Close