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.
 
 
 
 
 
 

41 lines
1.7 KiB

#!/bin/bash
# build up filename
# destination folder (change to your own needs)
BACKUP_FOLDER=/tmp
# Jugaralpadel
curl https://jugaralpadel.es/usuarios/api/usuarios/ > $BACKUP_FOLDER/jugar-usuarios.json
curl https://jugaralpadel.es/eventos/api/eventos/ > $BACKUP_FOLDER/jugar-eventos.json
curl https://jugaralpadel.es/eventos/api/reservas/ > $BACKUP_FOLDER/jugar-reservas.json
curl https://jugaralpadel.es/eventos/api/listaespera/ > $BACKUP_FOLDER/jugar-listaespera.json
curl https://jugaralpadel.es/eventos/api/noticias/ > $BACKUP_FOLDER/jugar-noticias.json
curl https://jugaralpadel.es/api/ayuda/ > $BACKUP_FOLDER/jugar-ayuda.json
tar cvfz $BACKUP_FOLDER/jugaralpadel-json.tar.gz $BACKUP_FOLDER/*.json
#sudo rm $BACKUP_FOLDER/*.json
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
# Reymota
curl https://reymota.es/usuarios/api/usuarios/ > $BACKUP_FOLDER/reymota-usuarios.json
curl https://reymota.es/lyrics/api/artistas/ > $BACKUP_FOLDER/reymota-artistas.json
curl https://reymota.es/lyrics/api/albumes/ > $BACKUP_FOLDER/reymota-albumes.json
curl https://reymota.es/lyrics/api/canciones/ > $BACKUP_FOLDER/reymota-canciones.json
curl https://reymota.es/repostajes/api/vehiculos/ > $BACKUP_FOLDER/reymota-vehiculos.json
curl https://reymota.es/repostajes/api/repostajes/ > $BACKUP_FOLDER/reymota-repostajes.json
tar cvfz $BACKUP_FOLDER/reymota-json.tar.gz $BACKUP_FOLDER/*.json
#sudo rm $BACKUP_FOLDER/*.json
sudo -u creylopez echo "Reymota - backup adjunto" |mail -s "Backup de reymota" creylopez@yahoo.es -A $BACKUP_FOLDER/reymota-json.tar.gz
#sudo rm $BACKUP_FOLDER/reymota-json.tar.gz