Forum Discussion

Oli_Rowan_30846's avatar
Oli_Rowan_30846
Icon for Nimbostratus rankNimbostratus
Feb 27, 2017

Is it possible to run [ tmsh save /sys config file ] where [file] is a remote directory?

Is it possible to run [ tmsh save /sys config file ] where [file] is a remote directory?

 

For example instead of running -

 

tmsh save /sys config file backup.scf

 

I could run -

 

tmsh save /sys config file user@server/f5/backup/backup.scf

 

That way I could have backups stored and distributed centrally?

 

Cheers, Oli

 

    • james_lee_31100's avatar
      james_lee_31100
      Icon for Nimbostratus rankNimbostratus

      You still need to save the configuration file locally, so you have latest updated configuration file

       

      you could use iCall to schedule the backup to remote location, you need to use ssh-keygen to generate ssh key for remote host to trust.

       

  • Not sure if tmsh would support the scp over. Would be interested in finding this out however. Otherwise you could always remote it over after saving said configuration.

     

  • The easy way would be to go with a bash script and run it on cron if you want automated. But to send the file to some remote server passwordless [article], you would need SSH Key exchange done to avoid password prompt.

    !/bin/bash
    
    tmsh save /sys config file backup.scf.$(date +%Y%m%d)
    
    scp /path/to/backup.scf.$(date +%Y%m%d)user@server/f5/backup/backup.scf.$(date +%Y%m%d)