#!/bin/bash
HOST=root@onfarbo45
DATEJ=$(date +%u)
DATES=(date +%W)
semaineMod=$(("${DATES}" % 4))

ssh "${HOST}" "mysqldump -u ap45 -pAzerty1+ bdarbre | gzip" > /root/sauv/jour/bdarbre45-"${DATEJ}".sql.gz

ssh "${HOST}" "mysqldump -u ap45 -pAzerty1+ bdarbre | gzip" > /root/sauv/semaine/bdarbre45-"${semaineMod}".sql.gz

scp -r "${HOST}":/var/www/html/PHPProjects/ONF /root/sauv/php45


exit 0
