Skip to content

Instantly share code, notes, and snippets.

@obfusk
Last active December 24, 2015 18:49
Show Gist options
  • Select an option

  • Save obfusk/6846272 to your computer and use it in GitHub Desktop.

Select an option

Save obfusk/6846272 to your computer and use it in GitHub Desktop.
backups presentation

backups

Felix C. Stegerman <[email protected]>

backups! backups! backups?!

what do you use?

    1. considerations
    1. srvbak
    1. cpbak

the why:

the what:

  • configuration files
  • data
  • sensitive data
  • databases (postgresql, mongodb)

the tools:

  • common tools: git, tar, rsync, gpg
  • restore

the network:

  • encryption
  • automation
  • transmission

the system:

  • consistency
  • stop + (re)start

the bad:

  • failure
  • corruption
  • history

the control:

  • transparency
  • logging

the private:

  • etckeeper
  • /etc/shadow + private (ssh) keys

srvbak:

why? control!

the steps:

  • commands to run before
  • baktogit + tar + gpg
  • non-sensitive data w/ rsync
  • sensitive data w/ tar + gpg
  • postgresql w/ pgdump + gpg
  • mongodb w/ mongodump + tar + gpg
  • dpkg selections
  • fix permissions
  • commands to run after

the modular:

  • customize / library
  • locking

the demo: srvbak configuration

the demo: srvbak run

the demo: srvbak code

cpbak:

remote server [-> local server] -> nas

the parts:

  • rsync-rot
  • ssh + commands
  • agent forwarding
  • cron job
  • locking + sudo

the demo: cpbak code

the other scripts:

  • baktogit
  • mailer
  • stat

the other tools:

  • git
  • s3
  • images

the q&a + the comparison

the links:

the end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment