简体   繁体   中英

How to Download my MYSQL Backup?

Okay I use this script here to make a backup of my database:

mysqldump -u root -h localhost -pPASSWORD forums | gzip -9 > backup-$(date +%Y-%m-%d).sql.gz

This is used in a cron daily.

But I need to download this remotely or through a ftp program every day as well so I have a physical copy of it on my home hard drive, is this possible? I know it is, can anyone tell me a quick way to do it?

mysqldump --user=root --password=PASSWORD forums | gzip | ncftpput -c -u root -p PASSWORD 76.121.167.17 backup-$(date +%Y-%m-%d-%s).sql.gz I found a fix, i just opened port 21 on my modem and turned on DMZ Hosting :) Thank you @MarcB!!!! Make sure NCFTP is installed :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM