Mailing List Archive

Backup script strategy
Hello, list !
Although my questions about backup from drdb device were unanswered, I
keep thinking on this topic and below present
my preliminary step by step algorithm for backup script (also with
questions):

1. Run on both nodes as cron job.
2. Determine if we are on secondary node.
secondary=get_state(); // pars /proc/drdb
if (secondary==true) do_step(3);
else exit; // we are at master node
3. Put drdb device off-line
/etc/rc.d/init.d/drdb stop
Probably it's better idea to add third state to driver - Backup
drdbsetup BACKUP
So Master will not send updates to the secondary while it is backuped.
4. Run dump utility for corresponding file system
(dump for ext2, dumpreiserfs for ReiserFS)
5. Put drdb device on-line
/etc/rc.d/init.d/drdb start
Or change state from Backup to Secondary
drdbsetup CLRBACKUP
6. Run quiqsync on Master node

Comments, ideas ?

TIA

--
Dim
Re: Backup script strategy [ In reply to ]
Dim Segebart wrote:
>
> Hello, list !
> Although my questions about backup from drdb device were unanswered, I
> keep thinking on this topic and below present
> my preliminary step by step algorithm for backup script (also with
> questions):
>
> 1. Run on both nodes as cron job.
> 2. Determine if we are on secondary node.
> secondary=get_state(); // pars /proc/drdb
> if (secondary==true) do_step(3);
> else exit; // we are at master node
> 3. Put drdb device off-line
> /etc/rc.d/init.d/drdb stop
> Probably it's better idea to add third state to driver - Backup
> drdbsetup BACKUP
> So Master will not send updates to the secondary while it is backuped.
> 4. Run dump utility for corresponding file system
> (dump for ext2, dumpreiserfs for ReiserFS)
> 5. Put drdb device on-line
> /etc/rc.d/init.d/drdb start
> Or change state from Backup to Secondary
> drdbsetup CLRBACKUP
> 6. Run quiqsync on Master node

Of course, if you have a failure during this time, you will be unable to
take over, because your data is "old". I suspect that you could easily
confuse the cluster manager with this kind of game playing ;-)

-- Alan Robertson
alanr@example.com