Forum Discussion
Thomas_Gobet
Dec 05, 2013Nimbostratus
Hi,
You don't really need to create a script if you're not confident in it. With crontab you can call every bash command you want.
For example you can do that :
0 1 * * * "tmsh save sys ucs my_file_name"
15 1 * * * "scp /var/local/ucs/my_file_name user@your_destination_server:path
It will create a backup every day at 1am and copy it with scp to your server at 1.15am
If you want here is a script which will make what you want :
!/bin/bash
$DATE=`date "+%m_%d_%y"`
Here we create the ucs archive
tmsh save sys ucs $DATE
Here we copy it to your server
scp /var/local/ucs/$DATE user@ip_server:path