mysqldump -uUSERNAME -pPASSWORT -r /[PATH]/Dumpfile.sql
mysqldump -uUSERNAME -pPASSWORT -r [PATH]/Dumpfile.sql –databases TESTD
mysql -uUSERNAME -pPASSWORT < /[PATH]/Dumpfile.sql
DB_PATH=${1:-/srv/www/vhosts/ccf-it.de/httpdocs/tiki-5.0/db/} BACKUP_DIR=${2:-/backup/mysql} db_tiki="CHECK" BINDIR=/usr/bin DO_IT=`basename $0` SETZE_DB=`egrep -v 'php|//' $DB_PATH/local.php | cut -d\$ -f2 | cut -d\; -f1` eval "$SETZE_DB" if [ "$db_tiki" = "mysql" ] then case $DO_IT in make_wiki_mysql_dump.sh ) # echo "${BINDIR}/mysqldump -u$user_tiki -p$pass_tiki -h$host_tiki -f --opt $dbs_tiki > $BACKUP_DIR/$dbs_tiki'.sql'" ${BINDIR}/mysqldump -u$user_tiki -p$pass_tiki -h$host_tiki -f --opt $dbs_tiki > $BACKUP_DIR/$dbs_tiki'.sql' ;; remove_wiki_mysql_dump.sh ) echo "rm -f $BACKUP_DIR/$dbs_tiki'.sql'" rm -f $BACKUP_DIR/$dbs_tiki'.sql' ;; *) echo "NO commands defined" exit 1 ;; esac fi
Das Originaldokument ist zu finden unter http://ccf-consulting.de/tiki-5.0/tiki-index.php?page=CCF_MySQL_backup%2Brestor