[Leaplist] database backup tips?

Ingo Claro miclaro at netred.cl
Fri Jan 30 18:08:09 EST 2009


Jason Boxman wrote:
> On Friday 30 January 2009 17:47:25 tom foster wrote:
> <snip>
>   
>> * I'm not sure on which machine to run the
>>   cronjob--remote, or local, or both?  one on the
>>   remote to dump and compress, one on the local to
>>   slurp and decompress and wget?
>>     
>
> I'd run it on the backup system and simply use ssh to execute a remote 
> command:
>
> ssh user at host 'mysqldump ...' | cat > /tmp/mydump.sql
>
> I think that'd work, though untested.  It'll pipe the whole thing over SSH to 
> the local system for you.  (You'll need ssh keys configured for it to work 
> via cron, though.)
>
> I do something similar right now as a post-run script with Dirvish.
>
>
>   
also for not typing a mysql password you can have a .my.cnf file in your 
home, and there put the user and password for mysql. for example:

/root/.my.cnf:
[mysqldump]
user = root
password = 'the root password'

don't forget to chmod 600 the file.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Leaplist mailing list