[script] Add script for wiki backup
This commit is contained in:
parent
2c52d4b4f6
commit
18bec51d9c
12
scripts/wiki_backup.sh
Executable file
12
scripts/wiki_backup.sh
Executable file
@ -0,0 +1,12 @@
|
||||
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
|
||||
/usr/bin/mysqldump -u $USER --password=$PASSWORD $DATABASE -c | /usr/bin/gzip > $file
|
||||
#rsync $BACKUP_DIR
|
||||
scp $file pi@tutabaga.hd.free.fr:~/Backups/wiki/
|
Loading…
Reference in New Issue
Block a user