Comprehensive Guide to Archives and Backups

 
Chapter 10
 
Archives and Backups
 
Example Backup System
 
Why Backup?
 
T
y
p
e
s
 
o
f
 
f
a
i
l
u
r
e
s
Power failures (software/hardware failure)
Natural disasters (fire, flood)
Security incidents (theft)
Hardware Failures (disk crash)
User error (rm -rf)
Social issues (stolen data)
 
Backup Best Practices
 
Centralized backup location
Label makers
Label everything!
Backup intervals
User accounts (daily)
Software development – Repositories (e.g. SVN)
At a minimum weekly
Make daily dumps fit on one piece of media
Keep media off-site
Protect your backups
Verify your media
 
A common backup strategy
 
D
o
 
n
o
t
h
i
n
g
 
It is the most widely used backup strategy.
No initial costs.
No backup schedule to follow
If you lose all your data – “Too bad so sad”
“Do nothing’” is the correct backup method for /usr/obj,
/usr/src and other directory trees that can be exactly recreated
by your system – but if in doubt, BACK IT UP!
 
Best Practices cont’
 
Backup data to fit on one piece of media
(realistic ?)
Keep backups off site?
(typical for larger corporations / sensitive media)
Protect backups
Physical security
Verify backup media
Generate catalog of backed up media
Remember the lifespan of recordable media (e.g.
tapes)
Worst case mitigation
 
Backup Media
 
Optical
CD-R,DVD-R,Blu-Ray
Max capacity 50GB (BD-
R DL)
Interface
SATA
USB(2.0, 3.0)
 
Backup Media cont’
 
Removable Hard Drives
Interface
USB
Firewire
Thunderbolt
Ideal for personal
use/small systems
 
Backup Media cont’
 
Small Tape drives
DAT – digital audio tape
DDS – digital data
storage
160GB
 
Backup Media cont’
 
DLT/S-DLT digital linear
tape
Higher capacities =
higher $$$$
Qauntum
600GB
 
Backup Media cont’
 
AIT - Advanced
Intelligent Tapes –
500GB?
VXA – 160GB?
LTO – Linear Tape Open
HP AJ038A Black 76.8TB
Rack mount Fibre
Channel Interface LTO
Ultrium 4 StorageWorks
MSL4048 Tape Library
$12K!!!!
 
 
My Sample Server
 
Linux Backup Tools
 
O
p
e
n
 
S
o
u
r
c
e
 
o
p
t
i
o
n
s
:
dump
tar
rsync 
  
(Apple’s Time Machine uses this)
Amanda
Bacula 
 
(heavily used, very popular)
 
 
DUMP
 
Linux utility
Creates backups that can span several tapes
Backups/restores any file type
Allows for incremental backups
Maintains  file permissions, ownership, and
modification times
 
DUMP cont
 
Dump does not work across remote file
systems
Dump only works on one disk partition
Dump is based on levels (0 to N)
A level N dump backs up all files that have
changed since the last dump of level less than N
Level 0 puts entire file system on tape
The  “restore” command will restore files archived
by dump
 
Dump example
 
To make a backup for a directory or file :
 
dump -0f tbackup /home/tavaris
This command creates a dump-file called “tbackup”
which is the backup of /home/tavaris/data directory.
dump-level 0 (specifies full-backup)
To make a backup for a directory or file which is
already backedup with dump level 0:
 
dump -1f tbackup /home/tavaris/
dump level 1 (specifies incremental  backup)
 
Tar
 
tar
 (1) (Tape Archive)  dates back to Version 6 of AT&T UNIX
(circa 1975). tar operates in cooperation with the file system;
tar writes files and directories to tape or to a file.
Usage: tar [options] archive-file-name files-to-archive
c -"create archive".
v  "verbose”
print all the filenames added or extracted from archive
f “filename appears after arguments”
z “compress with gzip”
M “multi-volume”
x “extract”
d  “compare” use to verify backups
n “newer” for incremental backups
 
Examples using tar
 
L
e
t
'
s
 
t
a
k
e
 
a
 
b
a
c
k
u
p
 
o
f
 
/
e
t
c
 
w
h
e
r
e
 
m
o
s
t
c
o
n
f
i
g
u
r
a
t
i
o
n
 
f
i
l
e
s
 
r
e
s
i
d
e
,
 
a
n
d
 
p
l
a
c
e
 
i
t
 
i
n
/
h
o
m
e
/
b
a
c
k
u
p
s
:
#
 
m
k
d
i
r
 
/
h
o
m
e
/
b
a
c
k
u
p
s
#
 
t
a
r
 
-
c
v
f
 
/
h
o
m
e
/
b
a
c
k
u
p
s
/
e
t
c
.
t
a
r
 
/
e
t
c
R
e
m
e
m
b
e
r
:
 
T
h
e
 
-
c
 
o
p
t
i
o
n
 
t
o
 
t
a
r
 
t
e
l
l
s
 
i
t
 
t
o
 
c
r
e
a
t
e
a
n
 
a
r
c
h
i
v
e
,
 
-
v
 
s
p
e
c
i
f
i
e
s
 
v
e
r
b
o
s
e
 
o
u
t
p
u
t
 
a
n
d
 
-
f
s
p
e
c
i
f
i
e
s
 
t
h
e
 
f
i
l
e
 
t
o
 
b
e
 
e
i
t
h
e
r
 
w
r
i
t
t
e
n
 
t
o
 
o
r
 
r
e
a
d
f
r
o
m
.
 
Y
o
u
'
l
l
 
s
e
e
 
q
u
i
t
e
 
a
 
l
o
t
 
o
f
 
o
u
t
p
u
t
 
a
s
 
t
a
r
 
c
r
e
a
t
e
s
t
h
e
 
a
r
c
h
i
v
e
 
a
t
 
t
h
i
s
 
p
o
i
n
t
.
 
Examples using tar
 
Now we check whether our archive has
actually been created
# cd /home/backups
# ls -al
This now show us a new file in this
directory  
etc.tar
If we now wanted to view the contents
of this backup we can run
#  
tar -tvf etc.tar
 
Examples using tar
 
This will show you the contents of the
etc directory as you backed it up.
To actually restore and and unpack the
contents that were backed up
previously:
# cd /home/backups
# 
tar -xvf etc.tar
 
Examples using tar
 
Notice that the restore actually creates a new
directory etc where you are located – not in
/etc
 !
This is because tar by default removes the
leading '/' from the directories it has backed
up in order not to overwrite the original files
on your system when you choose to do a
restore (a security consideration)
 
Tar Exercise
 
Backup /etc directory to
/home/student/backups/
cd
mkdir backups
tar –cvf /home/student/backups/etc.tar
/etc
cd backups
View the contents that were backed up
tar –tvf etc.tar
 
Bacula Primer
 
Bacula is an open source set of applications for
creating archives of filestysems and restoring file
systems from archives
Enterprise level software
Can backup Unix, Linux, and Windows systems
Supports tape libraries, auto-changers, and
multiple volumes
Creates a hash signature of file system
For file verification
And more!!!
 
Backups + Dracula = Bacula
 
It comes by night and sucks the vital essence from your computers!
 
Bacula Components
 
https://www.digitalocean.com/community
/tutorials/how-to-install-bacula-server-on-
centos-7
Slide Note
Embed
Share

Explore the importance of backups, types of failures they protect against, and best practices for creating effective backup systems. Learn about common backup strategies, best practices for backup data management, and various backup media options available. This comprehensive guide covers everything you need to know to safeguard your data.

  • Data Backup
  • Disaster Recovery
  • Best Practices
  • Backup Media
  • Data Protection

Uploaded on Sep 07, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Chapter 10 Archives and Backups

  2. Example Backup System

  3. Why Backup? Types of failures Power failures (software/hardware failure) Natural disasters (fire, flood) Security incidents (theft) Hardware Failures (disk crash) User error (rm -rf) Social issues (stolen data)

  4. Backup Best Practices Centralized backup location Label makers Label everything! Backup intervals User accounts (daily) Software development Repositories (e.g. SVN) At a minimum weekly Make daily dumps fit on one piece of media Keep media off-site Protect your backups Verify your media

  5. A common backup strategy Do nothing It is the most widely used backup strategy. No initial costs. No backup schedule to follow If you lose all your data Too bad so sad Do nothing is the correct backup method for /usr/obj, /usr/src and other directory trees that can be exactly recreated by your system but if in doubt, BACK IT UP!

  6. Best Practices cont Backup data to fit on one piece of media (realistic ?) Keep backups off site? (typical for larger corporations / sensitive media) Protect backups Physical security Verify backup media Generate catalog of backed up media Remember the lifespan of recordable media (e.g. tapes) Worst case mitigation

  7. Backup Media Optical CD-R,DVD-R,Blu-Ray Max capacity 50GB (BD- R DL) Interface SATA USB(2.0, 3.0)

  8. Backup Media cont Removable Hard Drives Interface USB Firewire Thunderbolt Ideal for personal use/small systems

  9. Backup Media cont Small Tape drives DAT digital audio tape DDS digital data storage 160GB

  10. Backup Media cont DLT/S-DLT digital linear tape Higher capacities = higher $$$$ Qauntum 600GB

  11. Backup Media cont AIT - Advanced Intelligent Tapes 500GB? VXA 160GB? LTO Linear Tape Open HP AJ038A Black 76.8TB Rack mount Fibre Channel Interface LTO Ultrium 4 StorageWorks MSL4048 Tape Library $12K!!!!

  12. My Sample Server

  13. Linux Backup Tools Open Source options: dump tar rsync (Apple s Time Machine uses this) Amanda Bacula (heavily used, very popular)

  14. DUMP Linux utility Creates backups that can span several tapes Backups/restores any file type Allows for incremental backups Maintains file permissions, ownership, and modification times

  15. DUMP cont Dump does not work across remote file systems Dump only works on one disk partition Dump is based on levels (0 to N) A level N dump backs up all files that have changed since the last dump of level less than N Level 0 puts entire file system on tape The restore command will restore files archived by dump

  16. Dump example To make a backup for a directory or file : dump -0f tbackup /home/tavaris This command creates a dump-file called tbackup which is the backup of /home/tavaris/data directory. dump-level 0 (specifies full-backup) To make a backup for a directory or file which is already backedup with dump level 0: dump -1f tbackup /home/tavaris/ dump level 1 (specifies incremental backup)

  17. Tar tar (1) (Tape Archive) dates back to Version 6 of AT&T UNIX (circa 1975). tar operates in cooperation with the file system; tar writes files and directories to tape or to a file. Usage: tar [options] archive-file-name files-to-archive c -"create archive". v "verbose print all the filenames added or extracted from archive f filename appears after arguments z compress with gzip M multi-volume x extract d compare use to verify backups n newer for incremental backups

  18. Examples using tar Let's take a backup of /etc where most configuration files reside, and place it in /home/backups: # mkdir /home/backups # tar -cvf /home/backups/etc.tar /etc Remember: The -c option to tar tells it to create an archive, -v specifies verbose output and -f specifies the file to be either written to or read from. You'll see quite a lot of output as tar creates the archive at this point.

  19. Examples using tar Now we check whether our archive has actually been created # cd /home/backups # ls -al This now show us a new file in this directory etc.tar If we now wanted to view the contents of this backup we can run # tar -tvf etc.tar

  20. Examples using tar This will show you the contents of the etc directory as you backed it up. To actually restore and and unpack the contents that were backed up previously: # cd /home/backups # tar -xvf etc.tar

  21. Examples using tar Notice that the restore actually creates a new directory etc where you are located not in /etc ! This is because tar by default removes the leading '/' from the directories it has backed up in order not to overwrite the original files on your system when you choose to do a restore (a security consideration)

  22. Tar Exercise Backup /etc directory to /home/student/backups/ cd mkdir backups tar cvf /home/student/backups/etc.tar /etc cd backups View the contents that were backed up tar tvf etc.tar

  23. Bacula Primer Bacula is an open source set of applications for creating archives of filestysems and restoring file systems from archives Enterprise level software Can backup Unix, Linux, and Windows systems Supports tape libraries, auto-changers, and multiple volumes Creates a hash signature of file system For file verification And more!!!

  24. Backups + Dracula = Bacula It comes by night and sucks the vital essence from your computers!

  25. Bacula Components

  26. https://www.digitalocean.com/community /tutorials/how-to-install-bacula-server-on- centos-7

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#