From: Gordan Bobic <gordan@bobich.net>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Synching a Backup Server
Date: Thu, 06 Jan 2011 22:29:40 +0000 [thread overview]
Message-ID: <4D264254.3030109@bobich.net> (raw)
In-Reply-To: <201101061426.30791.CACook@quantum-sci.com>
On 01/06/2011 10:26 PM, Carl Cook wrote:
> On Thu 06 January 2011 13:58:41 Freddie Cash wrote:
>> Simplest solution is to write a script to create a mysqldump of all
>> databases into a directory, add that to cron so that it runs at the
>> same time everyday, 10-15 minutes before the rsync run is done. That
>> way, rsync to the backup server picks up both the text dump of the
>> database(s), along with the binary files under /var/lib/mysql/* (the
>> actual running database).
>
> I am sure glad you guys mentioned database backup in relation to rsync. I would never have guessed.
>
> When I do my regular backups I back up the export dump and binary of the database.
>
> So overall I do the export dump of the database 15 minutes before rsync.
> Then snapshot the destination array.
> Then do the rsync.
> Right?
Yes, that should be fine. Not sure there's much point in backing up the
binary if you're backing up the dump. Note that you should be locking
all tables before doing a full dump. Otherwise, the dumped tables may be
inconsistent with each other (orphaned records).
> But how does merely backing up the database prevent it from being
> hosed in the rsync? Or does snapshot do that? Or does snapshot
> prevent other data on the disk from getting hosed?
The data on the disk is only being read, it won't be damaged. The
snapshot ensure that the image you get of the DB is consistent with
itself (i.e. no records got written to table A while you were backing up
table B). As I said, the consistency with a snapshot is equivalent to
the degree of consistency you will get if you just yank the power.
Gordan
next prev parent reply other threads:[~2011-01-06 22:29 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 17:35 Synching a Backup Server Carl Cook
2011-01-06 19:16 ` Freddie Cash
2011-01-06 19:34 ` Marcin Kuk
[not found] ` <AANLkTik-rhXAHW18id4WMMtdqXkicvzTZ47+2r6YMuY0@mail.gmail.com>
2011-01-06 19:47 ` Freddie Cash
2011-01-06 20:07 ` C Anthony Risinger
2011-01-06 20:13 ` Freddie Cash
2011-01-06 20:21 ` C Anthony Risinger
2011-01-06 21:06 ` Gordan Bobic
2011-01-06 21:39 ` Freddie Cash
2011-01-06 21:44 ` Carl Cook
2011-01-06 21:53 ` Gordan Bobic
2011-01-06 21:58 ` Freddie Cash
2011-01-06 22:26 ` Carl Cook
2011-01-06 22:29 ` Gordan Bobic [this message]
2011-01-06 23:07 ` Carl Cook
2011-01-07 16:14 ` Hubert Kario
2011-01-06 23:15 ` Fajar A. Nugraha
2011-01-06 21:42 ` Carl Cook
2011-01-06 21:52 ` Freddie Cash
2011-01-07 16:20 ` Hubert Kario
2011-01-09 11:46 ` Alan Chandler
2011-01-09 13:54 ` Fajar A. Nugraha
2011-01-09 15:32 ` Alan Chandler
2011-01-09 17:59 ` Freddie Cash
2011-01-09 18:30 ` Hugo Mills
2011-01-09 20:57 ` Alan Chandler
2011-01-09 22:01 ` Hugo Mills
2011-01-09 23:32 ` Alan Chandler
2011-01-11 22:25 ` Hugo Mills
2011-01-10 2:22 ` Fajar A. Nugraha
2011-01-11 22:41 ` Hugo Mills
2011-01-21 19:28 ` Freddie Cash
2011-01-22 13:45 ` Hugo Mills
2011-01-24 17:45 ` Freddie Cash
2011-01-22 13:55 ` Hubert Kario
2011-01-25 17:29 ` Kaspar Schleiser
2011-01-25 17:43 ` Hubert Kario
2011-01-25 17:59 ` Freddie Cash
2011-01-25 18:36 ` Hubert Kario
2011-01-10 13:14 ` Hubert Kario
2011-01-06 20:12 ` Fajar A. Nugraha
2011-01-06 21:43 ` Carl Cook
2011-01-06 21:43 ` Goffredo Baroncelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D264254.3030109@bobich.net \
--to=gordan@bobich.net \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).