2. Who needs to backup?
There are 2 kinds of people in this world:
1. Those who keep backups.
2. Those who lose their data.
3. What is a backup?
The copying and archiving of computer data to
assist in recovering from a data loss event.
4. What causes data loss?
● Failure
● Disaster
● Crime
● Intentional action
● Unintentional action
5.
6. Why keep a backup?
● Keeps important files safe
● Helps us recover from stupid mistakes
● Helps recover from malicious attacks
● CYA ( Cover Your Ass )
11. Rsync
● extremely efficient file transfer protocol for Unix
● open source (GNU license)
● written by Andrew Tridgell and Paul Mackerras at the
Australian National University in 1996
12. Rsync
We can backup to either local or remote server
LOCAL
Go to external disk for local backup. Backing up to same
hard drive is not sufficient for a comprehensive backup
solution!
EXTERNAL
Goes to rsync daemon (can be standalone or started from
rsync client by inetd). Route through SSH shell for security.
20. Incremental backups with Rsync
Hard links allow us to create extra nodes for
our files so we can make sure at least one copy
exists without using extra space.
21. Advantages of Rsync over cp
● Mirroring data
● Transmitting lots of data
● Only copy what is needed
● Use with --link-dest to create hard links for
incremental backups
22. Duplicity
● First developed in 2002.
● Current version is 0.6.19 released in May
2012
● GNU licensed
● Written in Python & C
● Leverages Rsync algorithm
● Available via package managers, or via
RPM, binaries, or source downloadable from
http://duplicity.nongnu.org/
26. Duplicity
Remote locations are specified using URIs:
● ftp://[user@]archive.business.com/backups
● rsync://[user@]newspeak.marketing.biz/outside_box/
● s3+http://awesometown-socool
27. Using Duplicity
By default, Duplicity doesn't need any
command line options to make encrypted,
incremental backups to a local or remote
location. However, for a sane backup strategy
we should:
● Perform periodic full (snapshot) backups
● Delete old backups
● Ignore certain files
32. Moar Duplicity
Also used to verify backups and restore backups
Verify:
duplicity verify [backup] [source]
can also be used to determine changes since backup
33. Moar Duplicity
Also used to verify backups and restore backups
Verify:
duplicity verify [backup] [source]
can also be used to determine changes since backup
Restore:
duplicity restore [backup] [destination]
Can use --file-to-restore and --time flags to specify more
precise restoration
34. Why use Duplicity over Rsync?
● Encrypted and signed archives
● Built in incremental backup
● Ability to use a wide range of local and
remote filesystems
35. Best Practices
● Trust, but verify
● Use strong passphrase
● Backup to multiple locations
● Automate
36. Automation
For the best backup strategy, we take the
human out of the equation.
● write a Bash script and cron it
● Use a GUI
37. Related Links
Jamie Zawinski on backups
http://www.jwz.org/doc/backups.html
Snapshot Backups with Rsync by Mike Ruebel
http://www.mikerubel.org/computers/rsync_snapshots/
Epydocs for Duplicity
http://duplicity.nongnu.org/epydoc/index.html
Duplicity to Amazon S3 Bash Script
http://blog.damontimm.com/bash-script-incremental-encrypted-backups-
duplicity-amazon-s3/
RTFM!
http://linux.die.net/man/1/rsync
http://duplicity.nongnu.org/duplicity.1.html
Lots of Horror Stories about not Backing Up
http://reddit.com/r/talesfromtechsupport