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

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

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

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


exit 0
