config/scripts/wiki_backup.sh

13 lines
351 B
Bash
Raw Normal View History

2013-01-04 10:57:59 +01:00
USER=Webapp
PASSWORD=pontault
DATABASE=wikimedia
BACKUP_DIR=/home/mathieu/backup
if [ ! -d $BACKUP_DIR ];
then
mkdir $BACKUP_DIR
fi
file=$BACKUP_DIR/wiki-$DATABASE-$(date '+%Y-%m-%d').sql.gz
2013-01-04 10:57:59 +01:00
/usr/bin/mysqldump -u $USER --password=$PASSWORD $DATABASE -c | /usr/bin/gzip > $file
#rsync $BACKUP_DIR
2014-01-23 18:03:39 +01:00
scp $file mathieu@tutabaga.hd.free.fr:~/Backups/wiki/