LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-19-2006, 10:25 PM   #1
balzack
LQ Newbie
 
Registered: Feb 2006
Posts: 5

Rep: Reputation: 0
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!
 
Old 02-20-2006, 03:08 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 08:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
cron nightly backup to ftp server rkane Linux - Networking 2 03-04-2004 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration