[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] piping mysqldump thru rdiff-backup

From: Eric Beversluis
Subject: Re: [rdiff-backup-users] piping mysqldump thru rdiff-backup
Date: Tue, 11 Jun 2013 12:03:03 -0400

Apparently mysqldump does just overwrite a file rather than raising an
error. I was assuming it wouldn't do that if the file already existed.

So I can just do the dump to some arbitrary location and then
rdiff-backup that file each time to where I want to save them.

On Tue, 2013-06-11 at 16:51 +0100, Dominic Raferd wrote:
> On 11/06/2013 15:59, Eric Beversluis wrote:
> > I want to create a cron job to do mysqldump and run the output through
> > rdiff-backup so it goes right into /home/eric/repository/mysql. Can
> > someone give me the correct syntax for that? Do I have to do the mysql
> > dump to a particular file and then rdiff that file? (Which would mean
> > I'd have to overwrite that file each time.) Or is there some way I can
> > just pipe the mysqldump output right through rdiff-backup?
> >
> > Thanks
> I'm not sure of the exact syntax to dump (that's a mysql question!) but 
> it shouldn't be a problem just to dump into the same file each time and 
> overwrite it, then backup that file with rdiff-backup. rdiff-backup will 
> keep all the versions of that file so you won't have lost anything.
> I just quiesce my mysql server using "FLUSH TABLES WITH READ LOCK;", 
> take an LVM snapshot, unquiesce with "UNLOCK TABLES;", and then backup 
> the snapshot of mysql (and other) data with rdiff-backup, so no need to 
> dump anything. Of course this depends on having the filesystem running 
> on top of LVM.
> HTH, Dominic
> http://www.timedicer.co.uk/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]