Linux Backups. Russell Adams <rladams@adamsinfoserv.com> Linux Backups p. 1



Similar documents
Preface Part I. Introduction 1. The Philosophy of Backup Champagne Backup on a Beer Budget Why Should I Read This Book? Why Back Up?

Backup and Recovery. W. Curtis Preston O'REILLY' Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

Amanda The Open Source Backup & Archiving Software. Ian Turner ian@zmanda.com 11 April Copyright 2006 Zmanda, Inc. All rights reserved.

Backing Up Your System With rsnapshot

Data Integrity: Backups and RAID

System Administration. Backups

Rsync based backups. Rsync is essentially a directory syncing program.

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 5 Manage Backup and Recovery

Backup with rdiff-backup and rsnapshot

Linux System Administration

Linux System Administration. System Administration Tasks

Data Integrity: Backups and RAID

ZFS Backup Platform. ZFS Backup Platform. Senior Systems Analyst TalkTalk Group. Robert Milkowski.

Other trademarks and Registered trademarks include: LONE-TAR. AIR-BAG. RESCUE-RANGER TAPE-TELL. CRONY. BUTTSAVER. SHELL-LOCK

IBM TSM DISASTER RECOVERY BEST PRACTICES WITH EMC DATA DOMAIN DEDUPLICATION STORAGE

Web-Based Data Backup Solutions

How To Backup To A Hard Drive On A Computer (For A Non-Free) Or Hard Drive (For Free) On A Network (For Non Free) Or A Network On A Pc Or Mac) On Your Computer (Free) On An

Obackup v1.84 RC2 Documentation

Bacula. The leading Opensource Backup Solution

I N D U S T R Y A R T I C L E. The New Case For Open Source Data Protection

MySQL Backup and Security. Best practices on how to run MySQL on Linux in a secure way Lenz Grimmer <lenz@mysql.com>

Incremental Backup Script. Jason Healy, Director of Networks and Systems

1 Context Manage users and group accounts and related system files [4]

Symantec NetBackup 7 Clients and Agents

Bacula The Network Backup Solution

Bacula The Network Backup Tool for *BSD, Linux, Mac, Unix and Windows

Lenz Grimmer

The Network Backup Solution

Linux Disaster Recovery best practices with rear

Open Source, Incremental Backup for Windows, Step By Step. Tom Scott BarCampLondon2, 17/2/07

How To Write An Ets Request For Proposal (Rfp)

Zmanda: Open Source Backup

VMware vsphere Data Protection 6.0

Vodacom Managed Hosted Backups

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

4PSA Total Backup User's Guide. for Plesk and newer versions

Bacula The Network Backup Solution

Rsync: The Best Backup System Ever

Optimized data protection through one console for physical and virtual systems, including VMware and Hyper-V virtual systems

Backup policies. Or - how not to get annoyed when you accidentally delete stuff. Warning - this does get a little technical

BackupPC. Network Startup Resource Center

This is when a server versus a workstation is desirable because it has the capability to have:

DFW Backup Software. Whitepaper DFW Backup Agent

Competitive Analysis Retrospect And Our Competition

VMware vsphere Data Protection 5.8 TECHNICAL OVERVIEW REVISED AUGUST 2014

Zoner Online Backup. Whitepaper Zoner Backup Agent

Centralized Disaster Recovery using RDS

Ahsay Backup Software. Whitepaper Ahsay Backup Agent

Symantec NetBackup for Microsoft SharePoint Server Administrator s Guide

KEEP CALM AND BREATHE DURING DISASTER RECOVERY

QuickSpecs. Overview. GBS Backup Nederland b.v. v1.4 - October 2015 info@gbsbackup.com 1. GBS_R2.0 Hybrid Backup server

Backup of ESXi Virtual Machines using Affa

Seriously: Tape Only Backup Systems are Dead, Dead, Dead!

Whitepaper FailSafeSolutions Backup Agent

Disaster Recovery Strategies: Business Continuity through Remote Backup Replication

Unix Sampler. PEOPLE whoami id who

Blaze Vault Online Backup. Whitepaper Blaze Vault Online Backup Agent

Maintain an effective data backup strategy. Weight 3

Managing your Red Hat Enterprise Linux guests with RHN Satellite

Step One: Installing Rsnapshot and Configuring SSH Keys

How To Use Attix5 Pro For A Fraction Of The Cost Of A Backup

Using Symantec NetBackup with Symantec Security Information Manager 4.5

Frequently Asked Questions (FAQs) United Computer Group, Inc. VAULT400 System i (AS/400) Agent

Every organization has critical data that it can t live without. When a disaster strikes, how long can your business survive without access to its

NAS 259 Protecting Your Data with Remote Sync (Rsync)

Table of Content. Official website:

DataTrust Backup Software. Whitepaper DataTrust Backup Agent. Version 6.3

Backup and Archiving Explained. White Paper

VMware vsphere Data Protection 6.1

CA ARCserve Family r15

Secure Your Business with EVault Cloud-Connected Solutions

Backup Methods for your BBB or RPi2 Node

Introduction to AIX 6L System Administration Course Summary

SoftLayer Fundamentals. Storage and Backup. August, 2014

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

RingStor User Manual. Version 2.1 Last Update on September 17th, RingStor, Inc. 197 Route 18 South, Ste 3000 East Brunswick, NJ

How To Use Rackspace Backup On A Computer Or A Hard Drive

The Remote Data Backup & Restore Service from

Swiss Safe Storage Online Backup Whitepaper Swiss Safe Storage Backup Agent

Introduction to Version Control

Advanced Linux System Administration Knowledge GNU/LINUX Requirements

EVault Technology Build Cloud-Connected Backup and Recovery Services for Datacenter

CROSS PLATFORM AUTOMATIC FILE REPLICATION AND SERVER TO SERVER FILE SYNCHRONIZATION

Total Backup Recovery 7

Linux Disaster Recovery best practices with rear

Software infrastructure and remote sites

Total Backup Recovery 7

RecoveryVault Express Client User Manual

Total Backup Recovery 7

TELE 301 Lecture 7: Linux/Unix file

FDR/UPSTREAM INNOVATION Data Processing Providing a Long Line of Solutions

syslog-ng Store Box PRODUCT DESCRIPTION Copyright BalaBit IT Security All rights reserved.

Symantec NetBackup 7.1 What s New and Version Comparison Matrix

BackupAssist Common Usage Scenarios

HP StorageWorks Data Protector Express versus Symantec Backup Exec white paper

More Efficient Virtualization Management: Templates

Best practices for operational excellence (SharePoint Server 2010)

Symantec NetBackup Getting Started Guide. Release 7.1

Online Backup Linux Client User Manual

Total Backup Recovery

Transcription:

Linux Backups Russell Adams <rladams@adamsinfoserv.com> Linux Backups p. 1

Linux Backup Discuss a variety of backup software & methods Recommendations for backup HOWTO for Rsnapshot Demonstration Linux Backups p. 2

Shameless Self Promotion Principal Consultant @ Adams Information Services LLC http://www.adamsinfoserv.com/ HLUG member since 2002 IBM CATE Provides Nationwide services and administration for IBM AIX, pseries, SAN Storage, HACMP Go Debian! Linux Backups p. 3

Basic Recommendations Use separate drives/media for data and backup Use RAID or other redundancy for all disks where possible Stop open applications during a backup (ie: VMWare, SQL) to prevent open files issues and backup corruption Always have a recent full backup Keep a recent offsite copy Linux Backups p. 4

Basic Recommendations TEST YOUR BACKUPS Linux Backups p. 5

Backup Software Variety of tools & full products for Linux Only covering file level backup here Discuss Bare metal restore Linux Backups p. 6

Features / Criteria Tool / Product Tool A tool works as a standalone command that performs a single function. Product Most products perform multiple functions and have a user interface. They are typically more complex than a standalone tool. Linux Backups p. 7

Features / Criteria Ease of use Learning curve Backup Restore Backup Type Full Incremental Linux Backups p. 8

Features / Criteria Media Disk Tape Indexing Remote Backup Compression Encryption Automation Linux Backups p. 9

Software cp tar rsync Duplicity rsnapshot AMANDA BackupPC k3b Mondo Rescue mkcdrec Linux Backups p. 10

cp Standalone tool Copy files to external drive/partition Easy to use, backup and restore use the same command Full backups, can perform incremental updates Disk media only No indexing, must be manually maintained Linux Backups p. 11

cp Optional remote (ie: scp) No compression, encryption Automation requires manual scripting & cron Linux Backups p. 12

cp Example cp -a src dest Recursively copies src to dest, preserves owner/group/time/symlinks cp -au src dest As above, but only copies items that have changed (ie: incremental) Linux Backups p. 13

tar Standalone tool, Unix standard for archival, competes with cpio Learning curve is mild Complex flags Restores are more complex than backups Supports both full and incremental backups Can write to files on disk or tape Linux Backups p. 14

tar Manual indexing, incremental indexes are required but file specific Remote backups supported via remote tape Full compression, gzip & bzip2 No encryption Automation requires manual scripting & cron Linux Backups p. 15

tar Example tar -zcvpf dest.tar.gz src Create an archive of files in src, preserving permissions, with compression. tar -g dest.dat -zcvpf dest.tar.gz src As above, but save an index file for creating incremental backups Linux Backups p. 16

tar Example tar -C dest -zxvpf src.tar.gz Restore from archive to dest, preserving permissions Linux Backups p. 17

rsync Standalone tool with fantastic flexibility Easy to use, can replace cp command Moderate learning curve, many options Backup & Restore can use the same command Full backups with fast incremental updates Writes to disk files only Manual indexing Linux Backups p. 18

rsync Remote backup fully supported, native and over scp Common tool for maintaining remote mirrors Can optionally compress network traffic, no file compression No encryption, when using scp network traffic is encrypted Automation requires manual scripting & cron Linux Backups p. 19

rsync Example rsync -av src dest Copies src to dest, preserving owner/group/permission/timestamp rsync -av src user@host:dest Copy via ssh to remote host Linux Backups p. 20

rsync Complex Example rsync verbose s t a t s r e c u r s i v e perms \ times d e l e te l i n k s \ max d e l e te =50 compress itemize changes \ exclude rladams /. m o z i l l a / f i r e f o x / / Cache \ exclude rladams / home \ exclude rladams / music \ exclude rladams / tmp \ log f i l e =/home / rladams /. rsync_home. log \ / home / backup home : / backup / thinkpad / Linux Backups p. 21

Duplicity CLI Product Key feature is creating remote backups on untrusted storage Moderate learning curve Backup and restore use similar commands Supports full and incremental backups Linux Backups p. 22

Duplicity Only writes to disk or remote host Internally indexed for incrementals Remote backup via SSH Full compression Encrypted via GnuPG Automation requires manual scripting & cron Linux Backups p. 23

rsnapshot Full featured tool for creating backups Fantastic storage algorithm Easy to use Backup to a directory tree Restore is simply copying files back into place Full backup with multiple incrementals Disk only Linux Backups p. 24

rsnapshot Indexed by iteration Pull remote backups supported via rsync & scp No compression or encryption Automation is easy One line cron job Setup config file Linux Backups p. 25

rsnapshot Example Covered in depth in the HOWTO rsnapshot weekly Take an incremental backup to weekly repository Linux Backups p. 26

AMANDA Product Server side, multiple clients Intelligent backup scheduling logic & tape handling Key features are disk spooling and tape indexing & library automation Linux Backups p. 27

AMANDA Steep learning curve CLI Only Backups are automated Restores are manual via ftp-like interface Supports repeated full backups and incrementals Linux Backups p. 28

AMANDA Writes to tape, uses local disk for spooling backups (fast!) Complex indexing Supports remote backup and compression Optional encryption Fully automated on the server side Linux Backups p. 29

BackupPC Product Server side, multiple clients Intelligent backup scheduling logic Key features are user interface & rsnapshot style backend storage Linux Backups p. 30

BackupPC Moderate learning curve Fantastic web interface with multiple user support & security Backups are easy to setup Restores via web interface File explorer, download files from browser Zip file download Push to host Linux Backups p. 31

BackupPC Supports full backup with multiple incrementals Disk only Complete indexing Optional on-disk compression Encryption over network using SSH, no file encryption Complete automation, jobs created & scheduled from web Linux Backups p. 32

BackupPC Linux Backups p. 33

BackupPC Linux Backups p. 34

BackupPC Linux Backups p. 35

BackupPC Linux Backups p. 36

BackupPC Linux Backups p. 37

BackupPC Linux Backups p. 38

Other k3b Deserves a mention for a quick method to backup files & directories to CDROM. Mondo Rescue Mondo Rescue takes a bare metal backup for full system restore. Popular with Redhat mkcdrec Another bare metal backup tool Linux Backups p. 39

Rsnapshot Storage Algorithm Rsnapshot uses hard links in a creative fashion to minimize the amount of storage required for multiple backups Total size is the total for one full backup and only changes for as many incrementals that are kept Linux Backups p. 40

Sample Disk Usage 46G / backup / d a i l y. 0 / 263M / backup / d a i l y. 1 / 269M / backup / d a i l y. 2 / 248M / backup / d a i l y. 3 / 8.6G / backup / d a i l y. 4 / 3.1G / backup / d a i l y. 5 / 252M / backup / d a i l y. 6 / 252M / backup / d a i l y. 7 / 247M / backup / d a i l y. 8 / 253M / backup / d a i l y. 9 / 59G t o t a l Linux Backups p. 41

Files & Linking Legend File Inode Symlink Regular File File_A.txt Inode 1 Linux Backups p. 42

Symlinks vs Hard Links Symlinked File File_A.txt Inode 1 File_A.txt Hardlinked File Inode 1 File_B.txt File_B.txt Linux Backups p. 43

Rsnapshot Backup Cloning new backup Time.0 File_A Time.1 File_A File_B File_B File_C File_C Linux Backups p. 44

Rsnapshot Backup Update clone via rsync Time.0 File_A Time.1 File_A File_B File_B File_C File_C Linux Backups p. 45

Rsnapshot Backup Backup Repository on Disk Time.0 Time.1 Time.2 Time.3 File_A File_A File_A File_A File_B File_B File_B File_B File_C File_C File_C File_C Linux Backups p. 46

HOWTO Backup script Udev rule for automatic automount & backup Cron job Rsnapshot.conf Linux Backups p. 47

Backup.sh #! / bin / sh ex [ f /. nobackup ] && e x i t exec > / tmp / backup. log 2>&1 mount / mnt / backup rsnapshot weekly sync umount / mnt / backup Linux Backups p. 48

Udev Rule /etc/udev/rules.d/10-my.rules KERNEL=="sd?1", SUBSYSTEMS=="usb ", ATTRS{ idproduct }=="0702", \ ATTRS{ idvendor }=="05 e3 ", SYMLINK=" backuphd ", \ RUN= " / bin / sh / r o o t / backup. sh " Linux Backups p. 49

Sample Cron Job 0 0 rsnapshot c / etc / rsnapshot. conf d a i l y Linux Backups p. 50

Rsnapshot.conf c o n f i g _ v e r s i o n 1.2 snapshot_root / mnt / backup / snapshots / no_create_root 1 cmd_cp / bin / cp cmd_rm / bin / rm cmd_rsync / usr / bin / rsync cmd_logger / usr / bin / logger i n t e r v a l weekly 5 verbose 5 l o g l e v e l 5 l o g f i l e / tmp / rsnapshot. log l o c k f i l e / var / run / rsnapshot. pid backup / etc thinkpad / backup / home thinkpad / Linux Backups p. 51

Q&A Linux Backups p. 52