YORIK’S COFFEE CORNER

You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.


in categories  linux  opensource  permalink:  249   posted on 07.04.2013 17:06
From Yorik

Retrieve a file via ftps + mysql backup


This is a note to myself, so I remember later, since the syntax is a bit complex and you need several variable settings (they can also be set in ~/.lftp):
lftp -e "set net:timeout 10; set ssl:verify-certificate no; set ftp:ssl-protect-data true;
get mydir/myfile.sql.gz; bye" -u myusername,mypassword ftp.myserver.com

You can use that to make automatic backups of a mysql database, by adding a line like this to your webhosts cron list:
/usr/bin/mysqldump -u myuser --password=mypassword databasename | /usr/bin/gzip >
/home/user/htmldir/mydir/myfile.sql.gz

First and foremost, your name:

And your message:

To publish it, just press this ...