This document provides an introduction to simpler methods for storing and restoring data, including using floppy disks, CDs, flash drives, DVDs, tape backup, online storage, and in-house backup methods. It discusses identifying what data to backup, where it is located, and how often to perform backups. Methods covered include secure copy, rsync over SSH, and setting up cron jobs to automate backups. The document also introduces BackupPC as an open source backup solution.
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Back Up 101
1. Storing & Restoring Data
General Introduction To Simpler Methods
Gowtham
sgowtham@mtu.edu
2008.09.04
Tuesday, February 24, 2009
2. Care?
Shoul
why
Be Paranoid?
dI
Worry?
What’s the worst that can happen ?
Tuesday, February 24, 2009
3. Hard Drive WILL Shortage of Time
NOT live
Schedule
YE
forever
Conflicts
Loss of
Power Time Wall
Outage
because CPU
Stealth Hardware Failure
S
Virus Attacks
ACCIDENTS
Hackers
friday 5 pm syndrome
Natural Disasters
Tuesday, February 24, 2009
4. Backup Solutions
Floppy, CD, Flash Drives, DVD
Economical & Portable
Quality HDs
Easy to loose / corrupt
~$0.20 / GB
Tape Backup
Seagate
Not all of us can afford
Western Digital
Maxtor
Online Storage
Costs (a lot of) $$
Enclosure: ~$20
Data Peepers
External Drives with
In-House Methods Push Button
Backup Solutions
Takes some effort
FREE (almost)
Tuesday, February 24, 2009
5. WHAT, WHERE and WHEN
FAILING TO
PLAN
IS
PLANNING TO
FAIL
Tuesday, February 24, 2009
6. WHAT, WHERE and WHEN
bin
/home/$USER
doc
Usually contains most of user’s data
lib
src
/usr/local and /opt
tmp
Locally installed/compiled programs
research
.files
/var .folders
Websites
Mail
Databases
MySQL
PostgreSQL
Tuesday, February 24, 2009
7. WHAT, WHERE and WHEN
A Reliable Destination
Not too old of a machine
Enough free space
Preferably same version of OS
How many
copies should
one keep?
Tuesday, February 24, 2009
8. How
Secure Copy
mkdir -p /home/$USER/research/rama
cd /home/$USER/research/rama
scp -r rama.phy.mtu.edu:/home/$USER/research/ .
What if the source
grows by few GB
every day & the
network is slower?
Tuesday, February 24, 2009
9. How
rsync over ssh
rsync -ave ssh -H rama:/home/$USER/research/
/home/$USER/research/rama/
Trailing slashes are
crucial!
Can SSH not prompt
for password?
Tuesday, February 24, 2009
10. SSH With No Password
ssh-keygen -t rsa -b 1024
scp .ssh/id_rsa.pub rama:id_rsa_ganesh.pub
ssh $USER@rama
cat id_ssh_ganesh.pub >> .ssh/authorized_keys
SOURCE will NOT ask for
password when
connecting from CLIENT
ssh, scp, rsync+ssh
Tuesday, February 24, 2009
11. Backing Up At Odd Hours
# cron job listing - save this file as
# /home/$USER/bin/cron_jobs
#
# Submit to cron via the command
# crontab /home/$USER/bin/cron_jobs
#
09 02 * * * /home/$USER/bin/rama_backup.sh > /dev/null
Command
Day of the Week (00-06; 0 = Sunday)
Month (01-12)
Day of the Month (01-31)
Hour (0-23)
Minute (0-59)
Tuesday, February 24, 2009
12. BackupPC
Open source project
Good Documentation and Support
Very elegant and effective
Clients machines can have any operating system
Works equally well for desktops and laptops
Sends emails when a client is not backed up
Requires a working installation of Apache, PHP, PERL
Tuesday, February 24, 2009
13. BackupPC
Open Source
Apache, PERL
GUI (TUI)
Flexible Scheduling
Add / remove clients
Linux, Mac, Win
Email Alerts
Effective Disk Usage
http://sgowtham.net/blog/archives/
Initiate backups
Search for ‘BackupPC’ Restore files/folders
Steps to configure Red Hat Enterprise Linux as server
Tuesday, February 24, 2009
14. Acknowledgments
Dr. Ravi Pandey
Center for Experimental Computation @ MTU
Tim Obermann
Linux Users’ Group @ MTU
Tuesday, February 24, 2009