DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th May 2008
RandomSF RandomSF is offline
Port Guard
 
Join Date: May 2008
Location: Hartland, WI, USA
Posts: 13
Thanked 0 Times in 0 Posts
Default Disaster recovery best practices

I am looking for a disaster recovery method whereby the full system is backed up ready to be restored to a new system. In the Windows world there are a variety of tools that can take an image of the entire system, making the restore a one step procedure and short time to a fully recovered system.

Does such a method exist for FreeBSD (likely not)?

If not, dump and restore appears to be the mostly suitable candidate. But the online resources I've found are generally incomplete or vague. Questions like how to script the snapshot portion of the backup along with temporary database server shutdown to get clean DB backups and minimize DB downtime are still missing.

Does such a Disaster Recovery document exist? Does someone have a method they use and would care to share? Should I be looking at a different method altogether?
Reply With Quote
  #2   (View Single Post)  
Old 6th May 2008
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 196
Thanked 5 Times in 5 Posts
Default

the shareware BootIt $35 or so (installable to a windows, and
maybe to its own partition, as well as to cd-r) is a
multiboot tool (supplanting GAG, maybe Grub, maybe the
BSD bootloader) which can backup FS as images (even multiple-ly
in BATCH mode)
opensource equivalents exist.
...........
no recc. per se on that as a Server solution as I have no experience
in it. But the freebsd-questions maillist archives have had many
discussions relevant to your question.
Reply With Quote
  #3   (View Single Post)  
Old 6th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

I'm not a professional user of FreeBSD (as my job doesn't entail computers :-() but I would guess that the closest documents to it would be the handbook, dump manual, and sh manual. Depending on dumps output and the situation at hand it might be possible to take down the DB until the snapshots finished and then bring it back online through a script.


Depending on your situation you could probably use some form of database replication, i.e. one database servicing clients and another 'slave' database that is periodontally brought into sync with the master.

And set things up so that while one database goes offline during a dump, the other is rotated into servicing requests. And then sync the slave with the master before bringing it back online


At least, if maximizing database uptime was *my* primary concern that is the kind of thing I would look at trying to do.


Cheers.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #4   (View Single Post)  
Old 6th May 2008
FloridaBSD FloridaBSD is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 58
Thanked 0 Times in 0 Posts
Default

The best disaster recovery scheme I can recommend to you is to back up your data religiously, in addition to this I highly recommend that every body whom has nay highly sensitive data on their hard drive envest in a network attached storage device.
__________________
Google Linux is a Green Horns Best Friend (GHBF).
Windows = a 32 bit extensions to a 16 bit patch to an 8 bit operating system originally coded for a four bit processor written by 2-bit monopolistic software company founded by a .3-bit Harvard Drop out, who can't stand one respectable bit of competition.
If I believe something to be immoral a will not keep quite and let my voice of annoyance be heard loud and clear.
Reply With Quote
  #5   (View Single Post)  
Old 29th November 2010
ghostcorps ghostcorps is offline
New User
 
Join Date: Nov 2010
Posts: 8
Thanked 0 Times in 0 Posts
Default

Hi all,

Lets say the disaster recovery process is not implemented and a blackout hits. And after the blackout a 2.3Tb RAID5 array on a RocketRAID 2030 no longer mounts.

mount /dev/da2p1 says that the filesystem is dirty and to try fsck...

fsck cannot determine filesystem type...

fsck_ffs looks like it worked, but when I try to mount it again it says operation not permitted...


What would you do?

I am dying here!
Reply With Quote
  #6   (View Single Post)  
Old 29th November 2010
ghostcorps ghostcorps is offline
New User
 
Join Date: Nov 2010
Posts: 8
Thanked 0 Times in 0 Posts
Default

sorry I meant a RocketRAID 2320.
Reply With Quote
  #7   (View Single Post)  
Old 29th November 2010
ghostcorps ghostcorps is offline
New User
 
Join Date: Nov 2010
Posts: 8
Thanked 0 Times in 0 Posts
Default

I tried mounting it read only and it worked like a charm
Reply With Quote
  #8   (View Single Post)  
Old 7th December 2010
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

We backup 127 servers each night via rsync to a FreeBSD storage server using ZFS. Each server in it's own sub-directory, using exclude files to skip things like /dev, /tmp, mozilla cache, etc.

Recovery process is simple:
  1. do a minimal install of FreeBSD, partitioning the disks as needed
  2. boot Frenzy CD
  3. get an IP
  4. mount local partitions into ~/mnt/ creating usr/, var/, home/ et al as needed
  5. rsync from backups server directory into ~/mnt/
  6. reboot

Depending on the network (100 vs 1000 Mbps) and the amount of data to be transferred, the restore process can take under 20 minutes (firewall), 90 minutes-ish (elementary school server) to a couple hours (secondary school server).

Other than 1 glitch with the way rsync handles a group of hardlinked files on one day becoming a bunch of scripts another day (gzip package in Debian 4.0 vs 5.0), everything works tickety-boo. We've restored several servers over the years since we started the system.

Search for rsbackup for all the gory details on our setup.

It's simple to modify the setup to use HAST to give you real-time replication into another off-site server (we're in the process of migrating to this setup). Or, one can script zfs send/recv, or script rsync to do the same.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #9   (View Single Post)  
Old 7th December 2010
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,052
Thanked 118 Times in 93 Posts
Default

Quote:
Originally Posted by phoenix View Post
[*]rsync from backups server directory into ~/mnt/
... I just wonder, rsync(1) is great for backup, but restore is only one way 'stream' without checking for file contents changes etc. so using 'raw' tar(1) pipe should make the restore a lot faster (especially if there are a lot small files):
backup_server # tar -cf - /servers/host | ssh -c blowfish root@host "tar -C ~/mnt -xpf -"

... and with really good compression for slow networks:
backup_server # tar -cf - /servers/host | gzip -9 -c | ssh -c blowfish root@host "tar -C ~/mnt -xzpf -"

... even better then gzip(1) with xz(1):
backup_server # tar -cf - /servers/host | xz -9 -c | ssh -c blowfish root@host "xz -d -c | tar -C ~/mnt -xpf -"
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup strategies and disaster planning sherekhan OpenBSD General 16 2nd June 2009 10:30 PM
data recovery. LateNiteTV FreeBSD General 8 29th August 2008 08:11 PM


All times are GMT. The time now is 11:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick