SlideShare a Scribd company logo
1 of 40
Download to read offline
Relax and Recover




Linux Disaster Recovery best
      practices with rear
          Gratien D'haese
          IT3 Consultants
Who am I
 ●   Independent Unix System Engineer since 1996
 ●   Unix user since 1986
 ●   Linux user since 1991
 ●   Open Source contributor:
       ●   The OTA CD-ROM (Linux95 before Windows95 :)
       ●   Make CD-ROM Recovery (mkCDrec)
       ●   Relax and Recover (rear)
       ●   SIM Installation and Logging (similar)
       ●   Adhocracy (adhocr)
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear          2
Business Continuity Planning
   ●
        Business Continuity Planning
         ●
             A business continuity plan specifies how a
             company plans to restore core business
             operations when disasters occur




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   3
Business Continuity Planning
   ●
        Business Process and Analysis
         ●
             Identification of business processes and their
             interrelationships
         ●
             Prioritizations of business processes
               –   Downtime tolerance
         ●
             Resource needs (must be shifted during crises)




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   4
Business Continuity Planning
   ●
        Communicating, Testing, and Updating the
        Plan
         ●
             Testing (usually through walk-throughs) needed
             to find weaknesses
         ●
             Updated frequently because business conditions
             change and businesses reorganize constantly
               –   Telephone numbers and contact numbers must be
                   updated even more frequently than the plan as a
                   whole



2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   5
Disaster Recovery

   ●
        Business Continuity Planning
         ●
             A business continuity plan specifies how a
             company plans to restore core business
             operations when disasters occur

   ●
        Disaster Recovery
         ●
             Disaster recovery looks specifically at the
             technical aspects of how a company can get back
             into operation using backup facilities

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   6
Disaster Recovery Concerns
 ●   Uptime
       ●   Quick restores with minimal or no manual steps
           after the recovery
 ●   Reliability
       ●   Avoid corrupted file systems and that system boots
           after recovery
 ●   Cost
       ●   DR solutions need to be affordable
 ●   Complexity
       ●   DR plans tend to be too complex.
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   7
Avoid Big Disaster?
 ●   Use Cloud Service provides?
       ●
           Feb 29th, 2012 Microsoft Azure was complete down
           for several hours (http://www.infoworld.com/print/187630)
             –   Leap year was to blame according Microsoft
       ●   Amazon cloud EC2 went down for almost 36 hours
           in some regions (April 22, 2011)
             –   a "networking event" caused a domino effect??
       ●   Google gmail out of service (May, 14, 2009)
 ●   Cloud Services are not the Holy Grail!


2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   8
GPL DR Solutions
 ●   Mondorescue http://www.mondorescue.org/
       ●   Started in 2000
       ●   Stable and lots of contributors
       ●   Needs lots of pre-requisites
       ●   Proper documentation
 ●   Relax and recover (rear) http://rear.github.com/
     or http://rear.sourceforge.net
       ●   Started in 2006
       ●   Evolving rapidly, less stable versions
       ●   Simple in use and quick; friendly developers
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   9
Getting started with rear
 ●   Download it from
       ●   The official tar-balls
             –   http://sourceforge.net/projects/rear/files/rear/
       ●   The rear-snapshot rpm's build from SVN
             –   http://download.opensuse.org/repositories/home:/sschapiro/
       ●   The official source
             –   https://github.com/rear/rear
       ●   The official repo's (Fedora, EPEL and SLES)
             –   yum install rear
             –   zypper install rear

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   10
Installation of rear
 ●   E.g. on Fedora 17
     # yum install rear
     Installing:
      rear                             noarch                1.12.0-1.fc17                 fedora   327 k
     Installing for dependencies:
      at                               i686                  3.1.13-7.fc17                 fedora    61   k
      bc                               i686                  1.06.95-6.fc17                fedora   106   k
      binutils                         i686                  2.22.52.0.1-5.fc17            fedora   3.6   M
      ed                               i686                  1.5-3.fc17                    fedora    72   k
      ethtool                          i686                  2:3.2-2.fc17                  fedora    93   k
      genisoimage                      i686                  1.1.11-10.fc17                fedora   338   k
      ….
     Install 1 Package (+40 Dependent packages)
     Total download size: 21 M
     Installed size: 65 M
     Is this ok [y/N]: y



 ●   We also need syslinux
     # yum install syslinux

 ●   Install nfs-utils, cifs-utils, rsync if required
 ●   Do not forget openssh(-clients)

2012-04-01 | Gratien D'haese            Linux Disaster Recovery best practices with rear                  11
Decide on DR strategy
 ●   Which backup mechanism to use?
       ●   GNU tar, rsync, bacula, commercial backup
           program
 ●   Where will the backups reside?
       ●   NFS share, CIFS share, external USB disk, tape,
           local spare disk
       ●   Remote network location
 ●   How shall we start the rescue image
       ●   Via CDROM (ISO image), tape (OBDR), network
           (PXE), USB disk
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   12
Backup Types
 ●   The major backup types available are
       ●   NETFS: NFS, CIFS, USB, TAPE
       ●   RSYNC: rsync method
       ●   REQUESTRESTORE, EXTERNAL
       ●   BACULA (open source backup software)
       ●   DP, NBU, TSM, GALAXY[7] (commercial stuff)
 ●   Some not (yet) implemented backup types
       ●   NSR (Legato Networker)
       ●   CDROM

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   13
BACKUP type NETFS
                                                                 pxelinux                    OUTPUT=PXE
                                                                 network                     BACKUP=NETFS
                isolinux
           OUTPUT=ISO




(NFS|CIFS|local)                                                                  extlinux
disks                                                                  External USB disks
                                  Tape drive




 OUTPUT=ISO                    OUTPUT=OBDR                                OUTPUT=USB
 BACKUP=NETFS                  BACKUP=NETFS                               BACKUP=NETFS


2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear                        14
Location BACKUP_URL
 ●   BACKUP=NETFS
 ●   BACKUP_URL can be
       ●   File type: BACKUP_URL=file:///directory/
       ●   NFS type: BACKUP_URL=nfs://nfs-server/directory/
       ●   CIFS type: BACKUP_URL=cifs://samba/directory/
       ●   USB type: BACKUP_URL=usb:///dev/sdc1/directory/
       ●   Tape type: BACKUP_URL=tape:///dev/nst0




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   15
Backup Program
 ●   BACKUP=NETFS
 ●   /usr/share/rear/conf/default.conf
       ●   By default is BACKUP_PROG=tar
       ●   However, BACKUP_PROG=rsync is possible for
           local attached storage
       ●   BACKUP_PROG_COMPRESS_OPTIONS="--
           gzip"
       ●   BACKUP_PROG_COMPRESS_SUFFIX=".gz"
       ●   BACKUP_PROG_EXCLUDE=( '/tmp/*'
           '/dev/shm/*' )
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   16
BACKUP_PROG_COMPRESS
                              _OPTIONS




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   17
/etc/rear/local.conf
 ●   Define your settings in /etc/rear/local.conf (or
     /etc/rear/site.conf)
 ●   # grep -v -E '(^#|^$)' /etc/rear/local.conf
     OUTPUT=ISO
     MODULES_LOAD=( vmxnet )
 ●   Add:
     BACKUP=NETFS
     BACKUP_URL=nfs://server/path
 ●   On NFS server backup => /path/$(hostname)/

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   18
Rear dump
 ●   View system configuration:
     Relax and Recover 1.12.0 / 2011-11-22 10:21:35 +0100
     Dumping out configuration and system information
     This is a 'Linux-i686' system, compatible with 'Linux-i386'.
     System definition:
                                   ARCH = Linux-i386
                                      OS = GNU/Linux




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear      19
Rear help
 ●   Usage: rear [-dDsSvV] [-r KERNEL] COMMAND [--
     ARGS...]
 ●   Available options:
       ●    -d             debug mode; log debug messages
       ●    -D                 debugscript mode; log every function call
       ●   -r KERNEL kernel version to use; current: '2.6.42.3-
           2.fc15.i686.PAE'
       ●    -s             simulation mode; show what scripts rear would include
       ●    -S             step-by-step mode; acknowledge each script individually
       ●    -v             verbose mode; show more output
       ●    -V             version information

2012-04-01 | Gratien D'haese         Linux Disaster Recovery best practices with rear           20
Rear help
 ●   Usage: rear [-dDsSvV] [-r KERNEL] COMMAND [--
     ARGS...]
 ●   List of commands:
             –   checklayout           check if the disk layout has changed
             –   format                format and label media for use with rear
             –   mkbackup              create rescue media and backup system
             –   mkbackuponly          backup system without creating rescue media
             –   mkrescue              create rescue media only
             –   recover               recover the system; only valid during rescue
             –   savelayout            save the disk layout of the system
             –   shell                 start a bash within rear; development tool

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear           21
Disaster Recovery in Practice
 ●   Gather system information
 ●   Store the disk layout
       ●   Partitioning, LVM and RAID configuration
       ●   File systems, file system labels ...
       ●   Boot loader (GRUB, LILO, ELILO)
 ●   Make a system backup (OS and user data)
 ●   Create boot-able rescue media with system
     configuration (and optional with backup data)
 ●   All steps are done “online”
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   22
Rear mkrescue
 ●   Will create an ISO image stored as
       ●   /tmp/rear-$(hostname).iso
       ●   On NFS server as /path/$(hostname)/rear-
           $(hostname).iso
 ●   Inspect disklayout.conf file under
     /var/lib/rear/layout/
 ●   Try to boot from the ISO image into the
     RESCUE system
       ●   Use 'dmesg' to check if devices were found

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   23
Rear mkbackup
 ●   Create rescue image with backup archive
 ●   Do not forget to browse through the
     /tmp/rear-$(hostname).log file for errors




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   24
BUG BUG BUG!
 ●   What now? Look in the log file
     2012-03-16 09:00:57 ERROR: BUG BUG BUG! Could not
     determine size of disk
     sda/sda11049kB2097kB1049kBbios_grub, please file a
     bug.
     Please report this as a bug to the authors of Relax
     and Recover
     /usr/share/rear/lib/layout-functions.sh: line
     390:
     /sys/block/sda/sda11049kB2097kB1049kBbios_grub/size
     : No such file or directory
 ●   Which version of rear? rear -V
 ●   Download latest snapshot and try again
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   25
Install rear-snapshot
 ●   # rpm -e rear
     warning: /etc/rear/local.conf saved as /etc/rear/local.conf.rpmsave
 ●   # rpm -ivh /tmp/rear-snapshot-
     0.0.794-5.1.noarch.rpm
 ●   Copy the saved local.conf.rpmsave back
     # cp /etc/rear/local.conf.rpmsave
     /etc/rear/local.conf
 ●   Try again: # rear -v mkrescue
 ●   Use debugscript mode: # rear -v -D mkrescue
       ●    See log file for the complete debugscript output
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   26
Recovery Process in detail
 ●   Boot system from rescue media
 ●   Restore disk layout
       ●   Create partitions, RAID configuration and LVM
       ●   Create file systems (mkfs, mkswap)
       ●   Configure file systems (labels, mount points)
 ●   Restore the backup data
 ●   Restore the boot loader
 ●   Inspect & Reboot

2012-04-01 | Gratien D'haese    Linux Disaster Recovery best practices with rear   27
Recover with rear (1)
 ●   Boot rescue image and select 'recover'




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   28
Recover with rear (2)
 ●   Wait until you see the login prompt
 ●




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   29
Recover with rear (3)
 ●   Start the recover process: rear -v recover




 ●   Have a look at the 'disklayout.conf' or continue




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   30
Recover with rear (4)
 ●   Rear creates a script 'diskrestore.sh' on the fly
 ●


 ●


 ●


 ●


 ●   Oops! An error and rear stops – what now?




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   31
Recover with rear (5)
 ●   View the rear log:
     +++ lvm lvcreate -l 126 -n lv_root vg
  Volume group "vg" has insufficient free
space (94 extents): 126 required.
 ●   Edit the restore script and find '126' and change
     it into '94' (the target disk was smaller!)
 ●   Continue with the recover and wait until the
     restore is complete
 ●   Inspect /mnt/local directory structure

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   32
Recover with rear (6)




 ●   Ready? Reboot
 ●   That's it – wait a while for the selinux relabeling
 ●   Verify the restored system
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   33
Get your hands dirty?
 ●   We hope you want to dig deeper into rear!
 ●   Getting started:
       ●   Use: rear -s mkbackup
           to see the flow of the scripts it will execute
       ●   Depends on BACKUP method, architecture and OS
           version/brand
       ●   Be careful: rear -s recover
           follows a different flow (seems logically, but you
           must understand the difference)


2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   34
Where is the code?
 ●   Main script is /usr/sbin/rear
 ●   All the other scripts live under /usr/share/rear
 ●   Documentation is at /usr/share/doc/rear-x.y.z
 ●   Good news! It's all written in Bash




2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   35
Where to put a script?
 ●    mkbackup method: /usr/share/rear/...
       ●    conf/ - configuration files (/etc/rear/*.conf read last)
       ●    prep/ - preparation work; checking the environment
       ●    layout/save/ - save the disk layout /var/lib/rear/layout
       ●    rescue/ - modules, network, storage,...
       ●    build/ - populate the initial ramdisk for our rescue image
       ●    pack/ - create the initrd and copy kernel
       ●    output/ - create the ISO image and copy to
            OUTPUT_URL
       ●    backup/ - make the backup archive to BACKUP_URL

2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   36
Where to put a script? (2)
 ●   recover method: /usr/share/rear/...
       ●   conf/ - read the configuration file + /etc/rear/*.conf
       ●   setup/ - user defined scripts to run before recover
       ●   verify/ - to check if a recover is possible at all
       ●   layout/prepare – recreate the disk layout
       ●   restore/ - restore the archive from BACKUP_URL
       ●   finalize/ - do some dirty tricks for disks, grub,...
       ●   wrapup/ - copy the recover log to /mnt/local/root/


2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   37
Example script: sysreqs.sh
 ●   A simple script to save basic system
     requirements – sysreqs.sh
       ●   OS version; rear version
       ●   CPU, memory
       ●   Disk space requirements
       ●   IP addresses in use; routes
 ●   Copy sysreqs.sh to a flow, e.g. rescue is a good
     choice
       ●   # cp /tmp/sysreqs.sh 
           /usr/share/rear/rescue/GNU/Linux/96_sysreqs.sh
2012-04-01 | Gratien D'haese     Linux Disaster Recovery best practices with rear   38
Test the script
   ●   # rear -s mkrescue | grep sysreqs
       Source rescue/GNU/Linux/96_sysreqs.sh
   ●   # rear -v mkrescue
   ●   # cat /var/lib/rear/sysreqs/MinSysReqs.txt
       Zowiezo - 2012-03-31 19:57

       Operating system:
       LSB Version:   :core-4.0-amd64:core-4.0-noarch
       Distributor ID:   Fedora
       Description:   Fedora release 16 (Verne)
       Release: 16
       Codename:   Verne

       Relax and recover version:
       Relax and Recover 0.0.819 / 2012-03-16 18:37:24 +0100
       ...
2012-04-01 | Gratien D'haese   Linux Disaster Recovery best practices with rear   39
Contacts

                     Web-site: http://rear.sourceforge.net/
                     GitHib: https://github.com/rear/rear
                     Mailing list: rear-users@lists.sourceforge.net

                      Rear Maintainer - Gratien D'haese - gratien.dhaese@it3.be

                    Rear Maintainer - Schlomo Schapiro - schlomo@schapiro.org

                      Rear Developer – Jeroen Hoekx - jeroen.hoekx@hamok.be

                               Rear Developer – Dag Wieers - dag@wieers.com




2012-04-01 | Gratien D'haese         Linux Disaster Recovery best practices with rear          40

More Related Content

What's hot

Kernel Configuration and Compilation
Kernel Configuration and CompilationKernel Configuration and Compilation
Kernel Configuration and CompilationBud Siddhisena
 
Red Hat System Administration
Red Hat System AdministrationRed Hat System Administration
Red Hat System AdministrationRafi Rahimov
 
Embedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practice
Embedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practiceEmbedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practice
Embedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practiceEmbeddedFest
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architectureSHAJANA BASHEER
 
Embedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theory
Embedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theoryEmbedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theory
Embedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theoryEmbeddedFest
 
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityOMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityAndrew Case
 
S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622Todd Deshane
 
De-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory AnalysisDe-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory AnalysisAndrew Case
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISORVanika Kapoor
 
Kernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootKernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootAnne Nicolas
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Tushar B Kute
 
Linux internal
Linux internalLinux internal
Linux internalmcganesh
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxKevin OBrien
 

What's hot (20)

Kernel Configuration and Compilation
Kernel Configuration and CompilationKernel Configuration and Compilation
Kernel Configuration and Compilation
 
Ch12
Ch12Ch12
Ch12
 
Red Hat System Administration
Red Hat System AdministrationRed Hat System Administration
Red Hat System Administration
 
Linux admin course
Linux admin courseLinux admin course
Linux admin course
 
Embedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practice
Embedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practiceEmbedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practice
Embedded Fest 2019. Wei Fu. Linux on RISC-V--Fedora and Firmware in practice
 
Rhce ppt
Rhce pptRhce ppt
Rhce ppt
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Embedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theory
Embedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theoryEmbedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theory
Embedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theory
 
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityOMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
 
S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622
 
De-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory AnalysisDe-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory Analysis
 
File Systems
File SystemsFile Systems
File Systems
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
 
Ilf2012
Ilf2012Ilf2012
Ilf2012
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
 
Kernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootKernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using Buildroot
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)
 
Linux internal
Linux internalLinux internal
Linux internal
 
RHEL6 - Rh124
RHEL6 - Rh124RHEL6 - Rh124
RHEL6 - Rh124
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 

Viewers also liked

A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...
A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...
A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...Symantec
 
Best Practices in Disaster Recovery Planning and Testing
Best Practices in Disaster Recovery Planning and TestingBest Practices in Disaster Recovery Planning and Testing
Best Practices in Disaster Recovery Planning and TestingAxcient
 
SharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel OlesonSharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel OlesonJoel Oleson
 
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...Amazon Web Services
 
The A to Z Guide to Business Continuity and Disaster Recovery
The A to Z Guide to Business Continuity and Disaster RecoveryThe A to Z Guide to Business Continuity and Disaster Recovery
The A to Z Guide to Business Continuity and Disaster RecoverySirius
 
Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)Narudom Roongsiriwong, CISSP
 
Disaster Recovery for SAP HANA with SUSE Linux
Disaster Recovery for SAP HANA with SUSE LinuxDisaster Recovery for SAP HANA with SUSE Linux
Disaster Recovery for SAP HANA with SUSE LinuxDirk Oppenkowski
 
Key Metrics for Disaster Recovery and Business Continuity
Key Metrics for Disaster Recovery and Business ContinuityKey Metrics for Disaster Recovery and Business Continuity
Key Metrics for Disaster Recovery and Business ContinuityAxcient
 
Disaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprintsDisaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprintsHarish Ganesan
 
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganKoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganTobias Koprowski
 
KoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganKoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganTobias Koprowski
 
100% Backup: Reload & Reload for Retain Deep Dive
100% Backup: Reload & Reload for Retain Deep Dive100% Backup: Reload & Reload for Retain Deep Dive
100% Backup: Reload & Reload for Retain Deep DiveGWAVA
 
Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...
Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...
Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...Chuck Patch
 
[Challenge:Future] Make up your mind to live
[Challenge:Future] Make up your mind to live[Challenge:Future] Make up your mind to live
[Challenge:Future] Make up your mind to liveChallenge:Future
 
Top 10 DB2 Support Nightmares #9
Top 10 DB2 Support Nightmares  #9Top 10 DB2 Support Nightmares  #9
Top 10 DB2 Support Nightmares #9Laura Hood
 
DB2 High Availability für IBM Connections, Sametime oder Traveler
DB2 High Availability für IBM Connections, Sametime oder TravelerDB2 High Availability für IBM Connections, Sametime oder Traveler
DB2 High Availability für IBM Connections, Sametime oder TravelerNico Meisenzahl
 
High availability solutions bakostech
High availability solutions bakostechHigh availability solutions bakostech
High availability solutions bakostechViktoria Bakos
 
Design patterns and plan for developing high available azure applications
Design patterns and plan for developing high available azure applicationsDesign patterns and plan for developing high available azure applications
Design patterns and plan for developing high available azure applicationsHimanshu Sahu
 

Viewers also liked (20)

A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...
A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...
A Step-By-Step Disaster Recovery Blueprint & Best Practices for Your NetBacku...
 
Best Practices in Disaster Recovery Planning and Testing
Best Practices in Disaster Recovery Planning and TestingBest Practices in Disaster Recovery Planning and Testing
Best Practices in Disaster Recovery Planning and Testing
 
SharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel OlesonSharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel Oleson
 
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
 
The A to Z Guide to Business Continuity and Disaster Recovery
The A to Z Guide to Business Continuity and Disaster RecoveryThe A to Z Guide to Business Continuity and Disaster Recovery
The A to Z Guide to Business Continuity and Disaster Recovery
 
Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)
 
Disaster Recovery for SAP HANA with SUSE Linux
Disaster Recovery for SAP HANA with SUSE LinuxDisaster Recovery for SAP HANA with SUSE Linux
Disaster Recovery for SAP HANA with SUSE Linux
 
Key Metrics for Disaster Recovery and Business Continuity
Key Metrics for Disaster Recovery and Business ContinuityKey Metrics for Disaster Recovery and Business Continuity
Key Metrics for Disaster Recovery and Business Continuity
 
Disaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprintsDisaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprints
 
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganKoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
 
KoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganKoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just began
 
100% Backup: Reload & Reload for Retain Deep Dive
100% Backup: Reload & Reload for Retain Deep Dive100% Backup: Reload & Reload for Retain Deep Dive
100% Backup: Reload & Reload for Retain Deep Dive
 
Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...
Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...
Not the Unthinkable, But What We Didn’t Think Of: Preparing For and Recoverin...
 
[Challenge:Future] Make up your mind to live
[Challenge:Future] Make up your mind to live[Challenge:Future] Make up your mind to live
[Challenge:Future] Make up your mind to live
 
Top 10 DB2 Support Nightmares #9
Top 10 DB2 Support Nightmares  #9Top 10 DB2 Support Nightmares  #9
Top 10 DB2 Support Nightmares #9
 
DB2 High Availability für IBM Connections, Sametime oder Traveler
DB2 High Availability für IBM Connections, Sametime oder TravelerDB2 High Availability für IBM Connections, Sametime oder Traveler
DB2 High Availability für IBM Connections, Sametime oder Traveler
 
A05
A05A05
A05
 
High availability solutions bakostech
High availability solutions bakostechHigh availability solutions bakostech
High availability solutions bakostech
 
Design patterns and plan for developing high available azure applications
Design patterns and plan for developing high available azure applicationsDesign patterns and plan for developing high available azure applications
Design patterns and plan for developing high available azure applications
 
Develop a Business Continuity Plan
Develop a Business Continuity PlanDevelop a Business Continuity Plan
Develop a Business Continuity Plan
 

Similar to Linux Disaster Recovery Best Practices with rear

The implementation of ldrp (with rear)
The implementation of ldrp (with rear)The implementation of ldrp (with rear)
The implementation of ldrp (with rear)loadays
 
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicUnix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicCircling Cycle
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesMender.io
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems Mender.io
 
Cobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningCobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningRUDDER
 
Asiabsdcon2013
Asiabsdcon2013Asiabsdcon2013
Asiabsdcon2013krispcbsd
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Mender.io
 
Intro to Kernel Debugging - Just make the crashing stop!
Intro to Kernel Debugging - Just make the crashing stop!Intro to Kernel Debugging - Just make the crashing stop!
Intro to Kernel Debugging - Just make the crashing stop!All Things Open
 
Best Practices for Deploying Enterprise Applications on UNIX
Best Practices for Deploying Enterprise Applications on UNIXBest Practices for Deploying Enterprise Applications on UNIX
Best Practices for Deploying Enterprise Applications on UNIXNoel McKeown
 
Thinking inside the box (shared)
Thinking inside the box (shared)Thinking inside the box (shared)
Thinking inside the box (shared)Joe Brockmeier
 
Tuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentTuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentJignesh Shah
 
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)Ron Munitz
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Ron Munitz
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
Up and Running with Freebsd
Up and Running with FreebsdUp and Running with Freebsd
Up and Running with FreebsdGLC Networks
 
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)Ron Munitz
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...ICS
 
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsThe Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsBill Malchisky Jr.
 

Similar to Linux Disaster Recovery Best Practices with rear (20)

The implementation of ldrp (with rear)
The implementation of ldrp (with rear)The implementation of ldrp (with rear)
The implementation of ldrp (with rear)
 
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicUnix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and images
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems
 
Cobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningCobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioning
 
Asiabsdcon2013
Asiabsdcon2013Asiabsdcon2013
Asiabsdcon2013
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
 
Intro to Kernel Debugging - Just make the crashing stop!
Intro to Kernel Debugging - Just make the crashing stop!Intro to Kernel Debugging - Just make the crashing stop!
Intro to Kernel Debugging - Just make the crashing stop!
 
Best Practices for Deploying Enterprise Applications on UNIX
Best Practices for Deploying Enterprise Applications on UNIXBest Practices for Deploying Enterprise Applications on UNIX
Best Practices for Deploying Enterprise Applications on UNIX
 
Thinking inside the box (shared)
Thinking inside the box (shared)Thinking inside the box (shared)
Thinking inside the box (shared)
 
Tuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentTuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris Environment
 
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Linux concept workshop
Linux concept workshopLinux concept workshop
Linux concept workshop
 
Up and Running with Freebsd
Up and Running with FreebsdUp and Running with Freebsd
Up and Running with Freebsd
 
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
 
Scale2013
Scale2013Scale2013
Scale2013
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
 
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsThe Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
 

More from Gratien D'haese

Open Technology Assemby Open Source Support Program
Open Technology Assemby Open Source Support ProgramOpen Technology Assemby Open Source Support Program
Open Technology Assemby Open Source Support ProgramGratien D'haese
 
Rear automated testing with Bareos
Rear automated testing with BareosRear automated testing with Bareos
Rear automated testing with BareosGratien D'haese
 
Relax-and-Recover Automated Testing
Relax-and-Recover Automated TestingRelax-and-Recover Automated Testing
Relax-and-Recover Automated TestingGratien D'haese
 
Business Continuity Planning with Bareos and rear (Loadays 2015)
Business Continuity Planning with Bareos and rear (Loadays 2015)Business Continuity Planning with Bareos and rear (Loadays 2015)
Business Continuity Planning with Bareos and rear (Loadays 2015)Gratien D'haese
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseGratien D'haese
 

More from Gratien D'haese (8)

Open Technology Assemby Open Source Support Program
Open Technology Assemby Open Source Support ProgramOpen Technology Assemby Open Source Support Program
Open Technology Assemby Open Source Support Program
 
What did you inspec?
What did you inspec?What did you inspec?
What did you inspec?
 
Rear automated testing with Bareos
Rear automated testing with BareosRear automated testing with Bareos
Rear automated testing with Bareos
 
Relax-and-Recover Automated Testing
Relax-and-Recover Automated TestingRelax-and-Recover Automated Testing
Relax-and-Recover Automated Testing
 
Business Continuity Planning with Bareos and rear (Loadays 2015)
Business Continuity Planning with Bareos and rear (Loadays 2015)Business Continuity Planning with Bareos and rear (Loadays 2015)
Business Continuity Planning with Bareos and rear (Loadays 2015)
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaese
 
Adhocr T-dose 2012
Adhocr T-dose 2012Adhocr T-dose 2012
Adhocr T-dose 2012
 
Exploring I Pv6
Exploring I Pv6Exploring I Pv6
Exploring I Pv6
 

Linux Disaster Recovery Best Practices with rear

  • 1. Relax and Recover Linux Disaster Recovery best practices with rear Gratien D'haese IT3 Consultants
  • 2. Who am I ● Independent Unix System Engineer since 1996 ● Unix user since 1986 ● Linux user since 1991 ● Open Source contributor: ● The OTA CD-ROM (Linux95 before Windows95 :) ● Make CD-ROM Recovery (mkCDrec) ● Relax and Recover (rear) ● SIM Installation and Logging (similar) ● Adhocracy (adhocr) 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 2
  • 3. Business Continuity Planning ● Business Continuity Planning ● A business continuity plan specifies how a company plans to restore core business operations when disasters occur 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 3
  • 4. Business Continuity Planning ● Business Process and Analysis ● Identification of business processes and their interrelationships ● Prioritizations of business processes – Downtime tolerance ● Resource needs (must be shifted during crises) 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 4
  • 5. Business Continuity Planning ● Communicating, Testing, and Updating the Plan ● Testing (usually through walk-throughs) needed to find weaknesses ● Updated frequently because business conditions change and businesses reorganize constantly – Telephone numbers and contact numbers must be updated even more frequently than the plan as a whole 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 5
  • 6. Disaster Recovery ● Business Continuity Planning ● A business continuity plan specifies how a company plans to restore core business operations when disasters occur ● Disaster Recovery ● Disaster recovery looks specifically at the technical aspects of how a company can get back into operation using backup facilities 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 6
  • 7. Disaster Recovery Concerns ● Uptime ● Quick restores with minimal or no manual steps after the recovery ● Reliability ● Avoid corrupted file systems and that system boots after recovery ● Cost ● DR solutions need to be affordable ● Complexity ● DR plans tend to be too complex. 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 7
  • 8. Avoid Big Disaster? ● Use Cloud Service provides? ● Feb 29th, 2012 Microsoft Azure was complete down for several hours (http://www.infoworld.com/print/187630) – Leap year was to blame according Microsoft ● Amazon cloud EC2 went down for almost 36 hours in some regions (April 22, 2011) – a "networking event" caused a domino effect?? ● Google gmail out of service (May, 14, 2009) ● Cloud Services are not the Holy Grail! 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 8
  • 9. GPL DR Solutions ● Mondorescue http://www.mondorescue.org/ ● Started in 2000 ● Stable and lots of contributors ● Needs lots of pre-requisites ● Proper documentation ● Relax and recover (rear) http://rear.github.com/ or http://rear.sourceforge.net ● Started in 2006 ● Evolving rapidly, less stable versions ● Simple in use and quick; friendly developers 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 9
  • 10. Getting started with rear ● Download it from ● The official tar-balls – http://sourceforge.net/projects/rear/files/rear/ ● The rear-snapshot rpm's build from SVN – http://download.opensuse.org/repositories/home:/sschapiro/ ● The official source – https://github.com/rear/rear ● The official repo's (Fedora, EPEL and SLES) – yum install rear – zypper install rear 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 10
  • 11. Installation of rear ● E.g. on Fedora 17 # yum install rear Installing: rear noarch 1.12.0-1.fc17 fedora 327 k Installing for dependencies: at i686 3.1.13-7.fc17 fedora 61 k bc i686 1.06.95-6.fc17 fedora 106 k binutils i686 2.22.52.0.1-5.fc17 fedora 3.6 M ed i686 1.5-3.fc17 fedora 72 k ethtool i686 2:3.2-2.fc17 fedora 93 k genisoimage i686 1.1.11-10.fc17 fedora 338 k …. Install 1 Package (+40 Dependent packages) Total download size: 21 M Installed size: 65 M Is this ok [y/N]: y ● We also need syslinux # yum install syslinux ● Install nfs-utils, cifs-utils, rsync if required ● Do not forget openssh(-clients) 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 11
  • 12. Decide on DR strategy ● Which backup mechanism to use? ● GNU tar, rsync, bacula, commercial backup program ● Where will the backups reside? ● NFS share, CIFS share, external USB disk, tape, local spare disk ● Remote network location ● How shall we start the rescue image ● Via CDROM (ISO image), tape (OBDR), network (PXE), USB disk 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 12
  • 13. Backup Types ● The major backup types available are ● NETFS: NFS, CIFS, USB, TAPE ● RSYNC: rsync method ● REQUESTRESTORE, EXTERNAL ● BACULA (open source backup software) ● DP, NBU, TSM, GALAXY[7] (commercial stuff) ● Some not (yet) implemented backup types ● NSR (Legato Networker) ● CDROM 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 13
  • 14. BACKUP type NETFS pxelinux OUTPUT=PXE network BACKUP=NETFS isolinux OUTPUT=ISO (NFS|CIFS|local) extlinux disks External USB disks Tape drive OUTPUT=ISO OUTPUT=OBDR OUTPUT=USB BACKUP=NETFS BACKUP=NETFS BACKUP=NETFS 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 14
  • 15. Location BACKUP_URL ● BACKUP=NETFS ● BACKUP_URL can be ● File type: BACKUP_URL=file:///directory/ ● NFS type: BACKUP_URL=nfs://nfs-server/directory/ ● CIFS type: BACKUP_URL=cifs://samba/directory/ ● USB type: BACKUP_URL=usb:///dev/sdc1/directory/ ● Tape type: BACKUP_URL=tape:///dev/nst0 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 15
  • 16. Backup Program ● BACKUP=NETFS ● /usr/share/rear/conf/default.conf ● By default is BACKUP_PROG=tar ● However, BACKUP_PROG=rsync is possible for local attached storage ● BACKUP_PROG_COMPRESS_OPTIONS="-- gzip" ● BACKUP_PROG_COMPRESS_SUFFIX=".gz" ● BACKUP_PROG_EXCLUDE=( '/tmp/*' '/dev/shm/*' ) 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 16
  • 17. BACKUP_PROG_COMPRESS _OPTIONS 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 17
  • 18. /etc/rear/local.conf ● Define your settings in /etc/rear/local.conf (or /etc/rear/site.conf) ● # grep -v -E '(^#|^$)' /etc/rear/local.conf OUTPUT=ISO MODULES_LOAD=( vmxnet ) ● Add: BACKUP=NETFS BACKUP_URL=nfs://server/path ● On NFS server backup => /path/$(hostname)/ 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 18
  • 19. Rear dump ● View system configuration: Relax and Recover 1.12.0 / 2011-11-22 10:21:35 +0100 Dumping out configuration and system information This is a 'Linux-i686' system, compatible with 'Linux-i386'. System definition: ARCH = Linux-i386 OS = GNU/Linux 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 19
  • 20. Rear help ● Usage: rear [-dDsSvV] [-r KERNEL] COMMAND [-- ARGS...] ● Available options: ● -d debug mode; log debug messages ● -D debugscript mode; log every function call ● -r KERNEL kernel version to use; current: '2.6.42.3- 2.fc15.i686.PAE' ● -s simulation mode; show what scripts rear would include ● -S step-by-step mode; acknowledge each script individually ● -v verbose mode; show more output ● -V version information 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 20
  • 21. Rear help ● Usage: rear [-dDsSvV] [-r KERNEL] COMMAND [-- ARGS...] ● List of commands: – checklayout check if the disk layout has changed – format format and label media for use with rear – mkbackup create rescue media and backup system – mkbackuponly backup system without creating rescue media – mkrescue create rescue media only – recover recover the system; only valid during rescue – savelayout save the disk layout of the system – shell start a bash within rear; development tool 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 21
  • 22. Disaster Recovery in Practice ● Gather system information ● Store the disk layout ● Partitioning, LVM and RAID configuration ● File systems, file system labels ... ● Boot loader (GRUB, LILO, ELILO) ● Make a system backup (OS and user data) ● Create boot-able rescue media with system configuration (and optional with backup data) ● All steps are done “online” 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 22
  • 23. Rear mkrescue ● Will create an ISO image stored as ● /tmp/rear-$(hostname).iso ● On NFS server as /path/$(hostname)/rear- $(hostname).iso ● Inspect disklayout.conf file under /var/lib/rear/layout/ ● Try to boot from the ISO image into the RESCUE system ● Use 'dmesg' to check if devices were found 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 23
  • 24. Rear mkbackup ● Create rescue image with backup archive ● Do not forget to browse through the /tmp/rear-$(hostname).log file for errors 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 24
  • 25. BUG BUG BUG! ● What now? Look in the log file 2012-03-16 09:00:57 ERROR: BUG BUG BUG! Could not determine size of disk sda/sda11049kB2097kB1049kBbios_grub, please file a bug. Please report this as a bug to the authors of Relax and Recover /usr/share/rear/lib/layout-functions.sh: line 390: /sys/block/sda/sda11049kB2097kB1049kBbios_grub/size : No such file or directory ● Which version of rear? rear -V ● Download latest snapshot and try again 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 25
  • 26. Install rear-snapshot ● # rpm -e rear warning: /etc/rear/local.conf saved as /etc/rear/local.conf.rpmsave ● # rpm -ivh /tmp/rear-snapshot- 0.0.794-5.1.noarch.rpm ● Copy the saved local.conf.rpmsave back # cp /etc/rear/local.conf.rpmsave /etc/rear/local.conf ● Try again: # rear -v mkrescue ● Use debugscript mode: # rear -v -D mkrescue ● See log file for the complete debugscript output 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 26
  • 27. Recovery Process in detail ● Boot system from rescue media ● Restore disk layout ● Create partitions, RAID configuration and LVM ● Create file systems (mkfs, mkswap) ● Configure file systems (labels, mount points) ● Restore the backup data ● Restore the boot loader ● Inspect & Reboot 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 27
  • 28. Recover with rear (1) ● Boot rescue image and select 'recover' 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 28
  • 29. Recover with rear (2) ● Wait until you see the login prompt ● 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 29
  • 30. Recover with rear (3) ● Start the recover process: rear -v recover ● Have a look at the 'disklayout.conf' or continue 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 30
  • 31. Recover with rear (4) ● Rear creates a script 'diskrestore.sh' on the fly ● ● ● ● ● Oops! An error and rear stops – what now? 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 31
  • 32. Recover with rear (5) ● View the rear log: +++ lvm lvcreate -l 126 -n lv_root vg Volume group "vg" has insufficient free space (94 extents): 126 required. ● Edit the restore script and find '126' and change it into '94' (the target disk was smaller!) ● Continue with the recover and wait until the restore is complete ● Inspect /mnt/local directory structure 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 32
  • 33. Recover with rear (6) ● Ready? Reboot ● That's it – wait a while for the selinux relabeling ● Verify the restored system 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 33
  • 34. Get your hands dirty? ● We hope you want to dig deeper into rear! ● Getting started: ● Use: rear -s mkbackup to see the flow of the scripts it will execute ● Depends on BACKUP method, architecture and OS version/brand ● Be careful: rear -s recover follows a different flow (seems logically, but you must understand the difference) 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 34
  • 35. Where is the code? ● Main script is /usr/sbin/rear ● All the other scripts live under /usr/share/rear ● Documentation is at /usr/share/doc/rear-x.y.z ● Good news! It's all written in Bash 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 35
  • 36. Where to put a script? ● mkbackup method: /usr/share/rear/... ● conf/ - configuration files (/etc/rear/*.conf read last) ● prep/ - preparation work; checking the environment ● layout/save/ - save the disk layout /var/lib/rear/layout ● rescue/ - modules, network, storage,... ● build/ - populate the initial ramdisk for our rescue image ● pack/ - create the initrd and copy kernel ● output/ - create the ISO image and copy to OUTPUT_URL ● backup/ - make the backup archive to BACKUP_URL 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 36
  • 37. Where to put a script? (2) ● recover method: /usr/share/rear/... ● conf/ - read the configuration file + /etc/rear/*.conf ● setup/ - user defined scripts to run before recover ● verify/ - to check if a recover is possible at all ● layout/prepare – recreate the disk layout ● restore/ - restore the archive from BACKUP_URL ● finalize/ - do some dirty tricks for disks, grub,... ● wrapup/ - copy the recover log to /mnt/local/root/ 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 37
  • 38. Example script: sysreqs.sh ● A simple script to save basic system requirements – sysreqs.sh ● OS version; rear version ● CPU, memory ● Disk space requirements ● IP addresses in use; routes ● Copy sysreqs.sh to a flow, e.g. rescue is a good choice ● # cp /tmp/sysreqs.sh /usr/share/rear/rescue/GNU/Linux/96_sysreqs.sh 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 38
  • 39. Test the script ● # rear -s mkrescue | grep sysreqs Source rescue/GNU/Linux/96_sysreqs.sh ● # rear -v mkrescue ● # cat /var/lib/rear/sysreqs/MinSysReqs.txt Zowiezo - 2012-03-31 19:57 Operating system: LSB Version: :core-4.0-amd64:core-4.0-noarch Distributor ID: Fedora Description: Fedora release 16 (Verne) Release: 16 Codename: Verne Relax and recover version: Relax and Recover 0.0.819 / 2012-03-16 18:37:24 +0100 ... 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 39
  • 40. Contacts Web-site: http://rear.sourceforge.net/ GitHib: https://github.com/rear/rear Mailing list: rear-users@lists.sourceforge.net Rear Maintainer - Gratien D'haese - gratien.dhaese@it3.be Rear Maintainer - Schlomo Schapiro - schlomo@schapiro.org Rear Developer – Jeroen Hoekx - jeroen.hoekx@hamok.be Rear Developer – Dag Wieers - dag@wieers.com 2012-04-01 | Gratien D'haese Linux Disaster Recovery best practices with rear 40