cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

Need a command for F5 to remote copy to server

Jump to solution

Hello,

I'm able in NCM to connect to the F5 Big-IP and issue a command to create a archive file (.ucs file) and it works great. I need help in finding a command that will be able to take that archive file and copy or move it to a remote share. Any suggestions?

Thanks.

Labels (1)
1 Solution
Level 18

Hi tolinrome,

How about

tmsh save /sys ucs ${SysName}_${Date}.ucs

${Delay:120}

scp /var/local/ucs/${SysName}_${Date}.ucs NSEuser@4.3.2.1:${SysName}_${Date}.ucs

SCPSERVERPASSWORD PLAIN TEXT

Regards,

Jiri

View solution in original post

0 Kudos
10 Replies
Level 7

How is the SCPSERVERPASSWORD passing the actual password?  I'm having issues that if I do the scp command manually, it asks for the password.  It still asks for it if I run it through the script.  I attempted to put the password into a variable and pass the variable but no go.

0 Kudos
Product Manager
Product Manager

Who's interested in joining The Big Fun F5 Brainstorm?

0 Kudos
Level 18

Hi tolinrome,

How about

tmsh save /sys ucs ${SysName}_${Date}.ucs

${Delay:120}

scp /var/local/ucs/${SysName}_${Date}.ucs NSEuser@4.3.2.1:${SysName}_${Date}.ucs

SCPSERVERPASSWORD PLAIN TEXT

Regards,

Jiri

View solution in original post

0 Kudos

Hi Jiri, long time no speak.

Can you let me know is this just a scheduled job in ncm using run a scipt command? or template change script?

0 Kudos

I admit I don't remember the details, but this looks like a simple script (potentially run by NCM scheduled job).

Jiri

0 Kudos

A few things...how are you offloading the file within a static script when the data variable changes? Also how are you able to complete the sftp login when prompted for password?

0 Kudos

Hi Jiri,

Your solution worked and thank you. But now we updated our Solarwinds to a newer version and the job doesn't work anymore as it should. The job runs at the selected schedule time and it creates the backup file as always, but it doesn't send it to the remote server.

Also, if I copy the command and paste it into the F5 then it will create the archive, ask me for the password, then send it to the remote server, but it doesnt send it in the correct naming format.

This is the command:

tmsh save /sys ucs ${SysName}_${Date}.ucs

${Delay:120}

scp /var/local/ucs/${SysName}_${Date}.ucs username@1.2.3.4:${SysName}_${Date}.ucs

password

If I do it manually by pasting that above command it creates the archive file correctly with the system name and date.ucs on the F5 but on the destination server the file is only named: _.ucs

If I let the job run as scheduled it will create the file correctly named on the F5 but thats it.

Any help?

Thanks.

0 Kudos

Hi tolinrome,

I think the most efficient way would be opening a support ticket.

Regards,

Jiri

0 Kudos

When I try this part of the command I get the timeout message below:

  1. scp /var/local/ucs/${SysName}_${Date}.ucs NSEuser@4.3.2.1:${SysName}_${Date}.ucs

I dont know if I'm doing it right but I just enter the username for "NSEuser" and destination IP for 4.3.2.1

ssh: connect to host 192.1.50.15 port 22: Connection timed out

0 Kudos

A 'connection timed out' message typically means there is an issue establishing the initial connection from the F5 device to the server that you are using SCP to connect to the device.

In these circumstances, it is best to issue the manual scp command on the F5 device and see if the connectivity works.  If you get the same message when you issue the SCP command on the F5 device it is most likely there a network connectivity or a firewall related issue between the F5 device and the SCP server. This will need to be resolved before the script has a chance of working.

0 Kudos