You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
549 B

# Backup date
today=$(date "+%Y_%m_%d-%H_%M_%S")
echo "Current date: $today"
# build up filename
# destination folder (change to your own needs)
BACKUP_FOLDER=/tmp
new_name=$BACKUP_FOLDER/Finanzas-$today.json
ping -c 4 finanzas.reymota.es
#curl https://finanzas.reymota.es/api/datos/ > $new_name
curl http://finanzas-finanzas.apps.ocp-cluster.reymota.lab/api/datos/ > $new_name
message="Backup stored "$today
sudo -u creylopez echo "Finanzas backup adjunto" |mail -s "Backup de Finanzas" creylopez@yahoo.es -A $new_name
sudo rm $new_name