Browse Source

Guarda datos en formato json para jugaralpadel

main
Celestino Rey 9 months ago
parent
commit
c138df383d
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      shells/guardaJson.sh

+ 23
- 0
shells/guardaJson.sh View File

@ -0,0 +1,23 @@
#!/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

Loading…
Cancel
Save