OpenXE/backup/mysql/mysql_ftp.sh.tpl

11 lines
278 B
Smarty
Raw Permalink Normal View History

2021-05-21 08:49:41 +02:00
#!/bin/sh
mysqldump dbname -h127.0.0.1 -u<username> -p<password> | gzip > /tmp/mysql_complete_daily.gz
ftp -inv <ipftpserver> << EOF
user <userftp> <passwordftp>
put /tmp/mysql_complete_daily.gz mysql_complete_`date +%y%m%d_0000`.gz
bye
EOF
rm -f /tmp/mysql_complete_daily.gz