|
From: | Dominic Raferd |
Subject: | Re: [rdiff-backup-users] Failover to warm standby and restore |
Date: | Mon, 21 Dec 2009 13:29:57 +0000 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Jakob Unterwurzacher wrote:
address@hidden schrieb:Dear all, A friend recommended that I use rdiff-backup to maintain a back up of an inconveniently large, reasonably slowly changing file repository. I would like to keep the back up copy on a warm standby system, so that if the primary host fails, I can reconfigure the standby to replace it. I understand that modifying the back up files will invalidate the rdiff snapshots. Is there a sane way of keeping the snapshots valid that does not involve maintaining a second back-up copy?I think you will need LVM snapshots for this. When the standby goes hot, create a read/write snapshot of the backup, make that snapshot available to the clients.When the primary host comes back up, are there any extraordinary considerations for updating its repository ?You will have to push the changes in the snapshot somehow to the primary (rsync -au ?). Then you can destroy the snapshot and do business as usual.
Very neat tip from Jakob, and makes me glad I use LVM! Depending on circumstances it might even be possible to make this an automatic failover solution, which would be even neater.
The physical volumes in the LVM volume group must be in LVM2 metadata format to create a read/write snapshot ('vgdisplay' will tell you). [LVM2 (try 'lvm version') uses LVM2 format by default, I think, but you can use 'pvcreate' with '-M2' switch to ensure it does. You can convert an existing LVM1 vg with 'vgconvert -M2'.]
Allocate plenty of space for the snapshot - if it runs out of space you lose it entirely. Although a short-lived snapshot is likely to require little space compared with the original logical volume (it is effectively a diff of it I guess), the only absolutely safe size is the same as the original logical volume.
Dominic
[Prev in Thread] | Current Thread | [Next in Thread] |