[DRBD-user] Re quest comments: DRBD to cold BackUp DMS with minimal DownTime

I. Schumacher dramatic.serenity at gmail.com
Fri Nov 12 12:12:21 CET 2010

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

bcnx wrote:
> On Thursday 11 November 2010 13:07:09 I. Schumacher wrote:
>> I am administrator of an Alfresco DMS running on an dedicated ubuntu
>> server
>> and is backedup to a streamer via a simple cron job.
>> Unfortunately my predecessor (who set up this backup process) did not
>> know
>> that streaming a backup while the DMS is running causes mysql database
>> inconsistencies preventing the DMS to boot after recovery. boo-hoo
>> Running a proper cold back requires approx 2h while the DMS is shutdown.
>> Thats just to long.
>> One way would be to set up a slave-read-only-dms-site with mysql
>> replication which can be shutdown for backup anytime while the master
>> system is still running. In my opinion this is a waste of ressources
>> because the slave site got to be up all the time, only building indices
>> out of the replicated mysql data.
>> In the course of an Upgrade to a newer version of the DMS I plan to
>> implement a new backup process using DRBD involving a well equipped
>> Master-DMS-Site and a MiniDRBD-Site for backup on another machine.
>> 1. I have two virtual machines on two separate physical machines. VM1=
>> MasterSite VM2=MiniDRBD
>> 2. VM1 is running Ubuntu Server, RDBD, iptables, sshd, mysqld,
>> oOffice-headless and tomcat.
>> 3. Residents of VM2 are Ubuntu Server, RDBD, sshd and iptables
>> 4. VM1 and VM2 use a virtual HardDisk /dev/sdb  each residing on the
>> corresponding physical machine
>> 5. RDBD repilicates "VM1/dev/sdb0" to "VM2/dev/sdb0" via /dev/drdb0
>> 6. VM1 stores all DMS relevant data including mysql database and indices
>> on
>> /dev/drdb0
>> To stream a cold BackUp with minimal DownTime I intend to use the
>> following
>> procedure:
>> 1. crontab a shell script on VM1 which
>> => stops DMS closing the database properly
>> => RDBD replicates the closed state of the database to VM2/dev/sdb0 via
>> /dev/drbd0
>> => stops replication via "drbdadm disconnect MyFS"
>> => starts the DMS again
>> => waits for 2.5h and starts replication via "drbdadm connect MyFS"
>> => exits
>> 2. Five Minutes after 1. started I crontab a shell script on VM2 which
>> => mounts VM2/dev/drdb0 to e.g. /media/drdb0
>> => streams all files to tape via "tar cvf - /media/drdb0/* | dd
>> of=/dev/str0/n block-size=4096"
>> => umounts /media/drdb0
>> => exits
>> (I think that:)
>> Streaming a BackUp that way reduces the downtime of the Master
>> (VM1/alfresco) to about 10 seconds instead of 2 hours. Additionally it (i
>> hope) nearly halves required CPU time and RAM usage in comparison to the
>> mysql-replication approach that is recommended by the Alfresco-DMS
>> vendor.
>> (:but I may be wrong)
>> Some general questions:
>> Q1. I wonder if DRDB will autosync all changes made on the master during
>> the "disconnect" to the slave after a "drbdadm connect MyFS" (in script
>> 1.
>> on VM1).
>> Q2. How long will it take drbd to replicate the closed state of a 150mb
>> database to VM2 so I can stop replication? (1GB/s LAN)
>> Q3. What do you think would be the minimum specs for my miniRDBD machine
>> (VM2). (128RAM,1core,256swap?)
>> Q4. Do you have any suggestions how to use drbd a smarter way for my
>> backup
>> purposes.
>> Q5. <Non drbd question> What is the best way to invoke all commands from
>> only one script on VM1? Commands on VM2 will have to be executed as root.
>> How can I do that without storing my root password as plaintext inside
>> the
>> script. I know I did that some time ago but I forgot how...
>> I hope you can help me.
>> Thanks a lot in advance. ;)
>> Dramatic
> Would using LVM snapshotting be a possibility? If you use it for your
> storage, it can provide you with a stable readonly copy when you take it
> after 
> shutting down MYSQL. If you use it for your VM storage, you could copy
> your 
> entire guest after pauzing or saving it.
> B.
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

How long would a LVM snapshot take when I backup the entire guest with
approx. 100gb?
Goal number One is to bring the MasterDMS up again as fast as possible after
shutting down.


View this message in context: http://old.nabble.com/Request-comments%3A-DRBD-to-cold-BackUp-DMS-with-minimal-DownTime-tp30188891p30198375.html
Sent from the DRBD - User mailing list archive at Nabble.com.

More information about the drbd-user mailing list