voila une copie d'un script modifie de la sorte pour l'exemple,
operator@linux:~> cat mbackup
#!/bin/sh
rm /var/log/mediabckp.log /var/log/comptbckp.log /var/log/prtrbckp.log
pg_dump -ft -O -v -Z9 -f medias.tar.gz medias > /var/log/mediabckp.log 2>&1
pg_dump -ft -O -v -Z9 -f compte.tar.gz compte > /var/log/comptbckp.log 2>&1
pg_dump -ft -O -v -Z9 -f prtr.tar.gz operator > /var/log/prtrbckp.log 2>&1
date >> /var/log/mediabckp.log
date >> /var/log/comptbckp.log
date >> /var/log/prtrbvkp.log
mv /home/operator/*.tar.gz /home/operator/backups >> /var/log/mediabckp.log
cp /home/operator/*.sh /home/operator/backups >> /var/log/mediabckp.log
mutt -a /var/log/mediabckp.log -s "MEDIA BACKUP" operator < mbackup.mail.txt
mutt -a /var/log/comptbckp.log -s "COMPTE BACKUP" operator < mbackup.mail.txt
mutt -a /var/log/prtrbvkp.log -s "TEST BACKUP" operator < mbackup.mail.txt
---------------
[:kuroineko] Francois.P tel: (+33)617230820 http://www.ifrance.com/fpussault fpussault@caramail.com