Dont Panic Website disaster planning for the rest of us Ronan - - PowerPoint PPT Presentation

don t panic
SMART_READER_LITE
LIVE PREVIEW

Dont Panic Website disaster planning for the rest of us Ronan - - PowerPoint PPT Presentation

Dont Panic Website disaster planning for the rest of us Ronan Dowling Pantheon.io DrupalCon Dublin - DevOps Who Am I? Agency Tools Lead at Pantheon Maintainer of Backup and Migrate Founder/Creator of NodeSquirrel


slide-1
SLIDE 1
slide-2
SLIDE 2

Don’t Panic

Website disaster planning for the rest of us

Ronan Dowling – Pantheon.io

DrupalCon Dublin - DevOps

slide-3
SLIDE 3

Who Am I?

  • Agency Tools Lead at Pantheon
  • Maintainer of Backup and Migrate
  • Founder/Creator of NodeSquirrel
  • ronan@pantheon.io
slide-4
SLIDE 4

Who Are You?

  • Drupal site owners and builders
  • Small to medium sites
slide-5
SLIDE 5

What is a Disaster?

Any event which prevents your website’s content from reaching your end user.

slide-6
SLIDE 6

What is a Disaster Recovery Plan?

“A disaster recovery plan (DRP) is a documented process or set of procedures to recover and protect a business IT infrastructure in the event of a disaster.”

  • http://en.wikipedia.org/wiki/Disaster_recovery_plan

○ 3 Basic Features: ○ preventive measures ○ detective measures ○ corrective measures

slide-7
SLIDE 7

Typical Advice

1. Identify all the threats to your site 2. Plan to recover from each threat 3. Practice!

slide-8
SLIDE 8

Risks to your site

  • Natural Disasters
  • Hackers

○ Intrusion ○ DDOS

  • User Errors
  • Imperfect Services
  • Success

○ The Reddit Hug/Slashdot Effect

  • ...
slide-9
SLIDE 9

Who cares?

slide-10
SLIDE 10

Less intimidating approach

1. Identify all the things that can fail 2. Figure out how to replace them 3. Practice!

slide-11
SLIDE 11

The things that can fail

slide-12
SLIDE 12

The parts

(most of them)

1. Domain Registrar 2. Authoritative Name Servers (DNS) 3. Web Server(s) 4. Drupal and Modules 5. Database(s) 6. Uploaded Files

slide-13
SLIDE 13

The Parts

slide-14
SLIDE 14

Your Domain

slide-15
SLIDE 15

Your Website

slide-16
SLIDE 16

The Parts

slide-17
SLIDE 17

Disaster Recovery

Preventative Measures Detective Measures Corrective Measures

slide-18
SLIDE 18

Disaster Recovery

Preventative Measures Detective Measures Corrective Measures “Figure out how to replace them”

slide-19
SLIDE 19

Preventative Measures

slide-20
SLIDE 20

Preventative Measures

○ Use Drupal security best practices ○ Use good vendors ○ Host, registrars etc. ○ Build in redundancy ○ Train your users

slide-21
SLIDE 21

Preventative Tools

slide-22
SLIDE 22

CloudFlare/Fastly

  • Protects from hackers
  • Prevent DDOS

○ intentional or unintentional

  • Free or $20+/mo

CDN/DNS/Front-end Cache

slide-23
SLIDE 23

Hosted DNS

  • Some protection from DDOS
  • Better uptime (than cheap hosts/registrars)
  • Actual redundancy
  • Con: One more point of failure

Dyn.com, Amazon Route 53, Easy DNS

Neither your registrar nor your host

slide-24
SLIDE 24

Detective Measures

slide-25
SLIDE 25

Detective Measures

○ Subscribe to security advisories ○ Set up Twitter alerts ○ For clients too ○ Audit site users and content ○ Set up automatic monitoring

slide-26
SLIDE 26

Detective Tools

slide-27
SLIDE 27

Pingdom/Uptime Robot

  • Visits your website periodically
  • Emails you if the site is down
  • Free plans available

Uptime Monitoring

slide-28
SLIDE 28

New Relic/Naigos/Appneta

  • Checks the health of the server

○ Resource usage etc.

  • Detect problems before they’re critical
  • Installed on your server
  • Talk to your host

○ New Relic Lite free with Acquia ○ New Relic Pro free with Pantheon

Application Monitoring

slide-29
SLIDE 29

Corrective Measures

slide-30
SLIDE 30

BACKUP!!!

Seriously

slide-31
SLIDE 31

What to back up

Server Config Code Database Files

slide-32
SLIDE 32

Server Config

  • Changes almost never
  • Not too hard to recover without backup
  • Difficult to back up
  • Ask your host
  • Keep a record of custom configuration
  • Adopt devops best practices

php.ini, nginx.conf, DNS zone files

slide-33
SLIDE 33

Code

  • Changes rarely
  • Sometimes possible to recover without backup
  • Most of it is on drupal.org/github etc.
  • Should be in a VCS

○ git, svn

  • Automate Deployment (deploybot.com)

Drupal, modules, themes, custom code

slide-34
SLIDE 34

Uploaded Files

  • Change infrequently
  • Difficult-ish to recover without backup
  • Relatively difficult to back up
  • Hundreds of MB+
  • Restoring is slow
  • Tools:

○ Backup and Migrate ○ Rsync ○ Custom scripts

Images, videos, documents

slide-35
SLIDE 35

Database

  • Changes frequently
  • Impossible to recover without backup
  • Easy to backup
  • A few MB to a few GB
  • Tools:

○ Backup and Migrate ○ phpMyAdmin ○ MySQLDump

All of your client’s hard work

slide-36
SLIDE 36

Levels of Backup

Server Level Application Level Content Level

slide-37
SLIDE 37

Server Level Backup

  • Provided by hosts
  • Backs up config/db/code/files
  • Slow to recover
  • Dependant on host/sysop
  • Best for total system failure
slide-38
SLIDE 38

Application Level Backup

  • Backup Drupal DB and Files
  • Controlled by site owner/admin
  • Recover in seconds
  • No support tickets needed
  • Best for user error and partial failure
slide-39
SLIDE 39

Content Level Backup

  • Per-node versioning
  • Recover specific nodes/entities
  • Built in to Drupal core
  • Best for: localized user error
  • Not good for: Things that aren’t entities. Deletes.
slide-40
SLIDE 40

Backup Location

Onsite Backup Offsite Backup

slide-41
SLIDE 41

Onsite Backup

  • Quickest Backup
  • Quickest Recovery
  • Not good for system failure

Backing up to the same server

slide-42
SLIDE 42

Offsite Backup

  • Slower to backup
  • More effort to set up
  • Available when your server is down
  • Offsite backup options

○ NodeSquirrel ○ Amazon S3 ○ FTP to another host

Backing up to a different server

slide-43
SLIDE 43

“Offsite backup from your host is NOT offsite”

slide-44
SLIDE 44

Restoring

slide-45
SLIDE 45

Restoring Your Site

  • Depends on your backup solutions
  • Depends on how ‘down’ your site is
  • Layer your levels
  • Practice
  • Time your practice
slide-46
SLIDE 46

Accessing Services

Know how to log-in in an emergency

slide-47
SLIDE 47

Keep all logins together

  • Web host, Registrar, DNS, CDN, etc.
  • Store online and offline
slide-48
SLIDE 48

Store tech support contacts

  • Web host, Registrar, DNS, CDN, etc.
  • Don’t rely on the company’s ticketing system

○ Also store email, phone, Twitter

slide-49
SLIDE 49

Email password reset

  • Have all account password reset to same email

○ Don’t use a real user’s email ○ Don’t use your website’s domain/server ○ Forward to anybody who might need to recover ○ Consider 2-factor auth

  • Test resetting passwords
slide-50
SLIDE 50

Your written plan

  • A list of 3rd party services with:

○ Login credentials ○ Support contacts

  • A list of internal people responsible for recovery
  • The location, type and frequency of every backup
slide-51
SLIDE 51

Evaluate This Session THANK YOU!

events.drupal.org/dublin2016/schedule

WHAT DID YOU THINK?

slide-52
SLIDE 52

JOIN US FOR CONTRIBUTION SPRINTS

First Time Sprinter Workshop - 9:00-12:00 - Room Wicklow 2A Mentored Core Sprint - 9:00-18:00 - Wicklow Hall 2B General Sprints - 9:00 - 18:00 - Wicklow Hall 2A