Linux KNOWLEDGE by Spreech 

 home |
Too Cool for Internet Explorer

Script: mysql Datenbanken sichern (backup3.ssh)

Bloged in Befehle by manuel.schwab Sonntag April 29, 2007

Sicherung der mysql DB werden mit mysqldumper durchgeführt.

#!/bin/bash
ftp -n [HOSTNAME] << EOF
user [USER] [PASSWORT]
bin
prompt
lcd /home/backup/mysql_backup/tausch/
cd html
cd mysqldumper1.21b
cd mysqldumper
cd work
cd backup
mget *.*
EOF
mkdir /home/backup/mysql_backup/$(date +%d).$(date +%m).$(date +%Y).$(date +%H):$(date +%M)/
cd /home/backup/mysql_backup/tausch/
cp *.* /home/backup/mysql_backup/$(date +%d).$(date +%m).$(date +%Y).$(date +%H):$(date +%M)/
rm *.*
mail -s „MySQL Backup beendet“ root@SPREECH

Keine Kommentare »

No comments yet.

Leave a comment


RSS feed for comments on this post. TrackBack URI

Powered by Wordpress, theme by Dimension 2k