#!/bin/bash # build up filename # destination folder (change to your own needs) BACKUP_FOLDER=/tmp curl https://jugaralpadel.es/usuarios/api/usuarios/ > $BACKUP_FOLDER/usuarios.json curl https://jugaralpadel.es/eventos/api/eventos/ > $BACKUP_FOLDER/eventos.json curl https://jugaralpadel.es/eventos/api/reservas/ > $BACKUP_FOLDER/reservas.json curl https://jugaralpadel.es/eventos/api/listaespera/ > $BACKUP_FOLDER/listaespera.json curl https://jugaralpadel.es/eventos/api/noticias/ > $BACKUP_FOLDER/noticias.json curl https://jugaralpadel.es/api/ayuda/ > $BACKUP_FOLDER/ayuda.json tar cvfz $BACKUP_FOLDER/jugaralpadel-json.tar.gz $BACKUP_FOLDER/*.json #rm $BACKUP_FOLDER/*.json message="Backup stored "$today sudo -u creylopez echo "Jugaralpadel - backup adjunto" |mail -s "Backup de jugaralpadel" creylopez@yahoo.es -A $BACKUP_FOLDER/jugaralpadel-json.tar.gz #sudo rm $BACKUP_FOLDER/jugaralpadel-json.tar.gz