On Wed, Jun 3, 2009 at 9:28 AM, Tino Schwarze <backuppc.lists@tisc.de> wrote:
Hi Wayne,

On Wed, Jun 03, 2009 at 08:45:57AM -0400, Wayne Scott wrote:

> The way to do it on linux is to use network block devices and to a raid1
> mirror on the primary backuppc volume with the second volume being the nbd
> that actually writes to a drive on another server.  Then during normal
> operation when nbd is detached and missing from the raid, and nightly you
> attach it and the normal linux raid code will mirror the drive.
>
> This works live without getting in the way of backuppc's operation and it
> relatively fast.
>
> There are lots of howto's on this subject and whole companies formed around
> solutions in this area, but for what you want most of those solutions are
> more than you need.
>
> The net result is an online copy of the whole filesystem and you bypass the
> issue of hardlinks completely.
> And if the network is fast it is way faster than the time it takes rsync to
> process all that data.

I've got a question and a remark regarding this approach:

1. Does the Linux RAID code only mirror changed portions of the device?
Or will it copy everything?

Don't know what the default does.  I am sure than one of the many different raid solutions for Linux should do this.
 
2. You probably end up with _no_ useful backup if something bad happens
to your local drive just during the mirroring process.

Yes.  The same is true of the previous solution of just shutting down backuppc and and mirroring the volume directly.

You can always address this with another volume on the target server to save a clean copy of the previous transfer.
Or a nbd that saves a transaction log.

I am just pointing out approaches.  As I said this stuff is tricky enough that whole companies have been created to sell what is already available for free, but very hard to get right.

For example: http://www.drbd.org/
(merely a cut-n-paste from google, I am claiming good or bad about this product)

-Wayne