LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   help downloading nightly mysql db backup from one server to another... (https://www.linuxquestions.org/questions/linux-software-2/help-downloading-nightly-mysql-db-backup-from-one-server-to-another-417340/)

balzack 02-19-2006 10:25 PM

help downloading nightly mysql db backup from one server to another...
 
hi-

i backup my mysql databases nightly. i have my webserver setup with a bash script that dumps the database nightly that i found/modified and it runs with a cron job. it works great but the backups are local on the webserver.

i have a linux server at home and i want to have that login to the webserver nightly and download the nightly mysql backup. i'm having a bit of trouble figuring out how to do this and would like some recomendations.

i was looking into trying to write a bash script for my linux server at home to use sftp to login to the webserver and download the backups, but i can't seem to find anything. i'd prefer not to use ftp because because it sends passwords in cleartxt.

i'm pretty new to linux so go easy on me. ;)

thanks for any recomendations / help!

btmiller 02-20-2006 03:08 AM

Setup host keys and use either passwordless scp (with host keys) or rsync over ssh. The ssh-keygen man page has a pretty good description of generating host keys. Basically, run ssh-keygen and add the public key it produces for you to the authorized_keys file in your .ssh directory on the server. Then, assuming you haven't protected the key itself with a passphrase (probably OK if you're sure no one else has access to your computer), you can ssh/scp to/from your server without a password. The key is used to authenticate you instead.


All times are GMT -5. The time now is 06:56 PM.