This document discusses backup and restore strategies in Solaris OS. It begins by explaining the basic terms of backup, restore and archive. It then discusses which files should be backed up, how often backups should occur and when backups should take place to minimize impact. The document also covers how long data should be stored, where backup tapes or files should be stored, how often tapes should be retired and the evolution of backup methods from standalone to network-based solutions. Finally, it discusses different backup strategies like full, incremental and differential backups and provides examples of using various Solaris backup tools like tar, ufsdump, ufsrestore, fssnap and flash archive.
1. USE IMPROVE EVANGELIZE
Backup & Restore (BR)
in Solaris OS
Achmad Mardiansyah
Sun Certified Network Administrator
Freelance Engineer
2. 2
USE IMPROVE EVANGELIZE
Imagine...
● virus infects your entire computer network.
● The virus spreads through every
employee’s workstation
● into every document and database file
● All your work, all your data—it’s all
destroyed
How would your business recover?
Without an adequate BR plan,
your business is at risk.
3. 3
USE IMPROVE EVANGELIZE
Basic Terms
● backup is the process of transferring data
from system to a separate storage device.
● restore is the process to put back data from
device and resume normal business
operations.
● archive is a long-term, permanent data
backup, which is kept off-site.
4. 4
USE IMPROVE EVANGELIZE
Types of Files Should Be Backed Up
● data files
– important files
– change frequently
● system files
– contain specific user information: settings & password
● software files
– contain softwares to run the bussiness
Note: Periodically, you should also back up the entire system in case of a
catastrophic disaster.
5. 5
USE IMPROVE EVANGELIZE
How Often Should Data Be Backed Up?
● Depends on requirements (ask users)
● Can be: minutes, hours, days, months etc.
● Define the backup schedule
6. 6
USE IMPROVE EVANGELIZE
When Should Backups Take Place?
● back up data after regular business hours
when employee demands on the network
are at a minimum.
● This off-hours time frame is called the
“backup window”. Usually at night.
● For 24 hours operations company,
determine a time period when employees
will be the least affected.
Note: use backup software that has an open file option. This option
allows you to perform a backup while the files are in use.
7. 7
USE IMPROVE EVANGELIZE
How Long Should Data Be Stored?
depends on the type of data and business requirements:
●
For data files (change frequently)
– keep only the most recent files, as the previous data becomes
obsolete, tapes can be overwritten and reuse.
●
For the full set of files on your system
– store the files in a secure, off-site location. Entire system can be
recovered in case a disaster destroys the originals.
● For certain types of data (tax records, contracts, personnel files,
patient records, etc)
– Data is needed to be archived specified time period to meet
specific legal requirements. Example to be used in court as
prove.
8. 8
USE IMPROVE EVANGELIZE
Where Should Backup Tapes Be Stored?
● ON-SITE
– immediate recovery
● OFF-SITE
– in case your business suffers a fire, theft, or other
disaster.
Many small companies choose to store backup tapes
in a safe-deposit box at a local bank or even at the
owner’s home.
10. 10
USE IMPROVE EVANGELIZE
Backup Evolution: Standalone backup
● 1980s technology
● only carry single catridge
● manual swap of the tape (usually system admin)
● capacity of tape become bigger than disk (eliminate
backup person)
● due to lots of data is being backuped, somebody must
attend backup process.
11. 11
USE IMPROVE EVANGELIZE
Backup Evolution: Automated backup
● 1990s technology
● using library to handle multiple
catridges
● bigger capacity, with compressing
● unattend backup process (using
robotic mechanism)
● still need backup admin:
– checking the tapes were loaded
– checking the backup job was
completed successfully
– labeling and storing of tapes
– identifications of failures
– etc.
12. 12
USE IMPROVE EVANGELIZE
Backup Evolution: LAN backup (1)
● late 1990s
● using LAN as transfer media
● advantages:
– able to share a single tape library
among the servers
– good scalability
– easy to manage
– costs were reduced.
● disadvantages:
– LAN is not reliable compare to directly
attached devices
– consume more bandwidth: decrease
performance, longer backup time
– slow down client-server applications
14. 14
USE IMPROVE EVANGELIZE
Backup Evolution: Dedicated LAN backup
● eliminates backup performance problem
● still bandwidth limited
● requires reliable LAN
15. 15
USE IMPROVE EVANGELIZE
Backup Evolution: Storage area network(1)
● latest technology, many companies using SAN as data storage
● advantages:
Ease of administration (centralized, unattend, automatic)
Scalability
High bandwidth interface (using fibre channel interface)
High performance (fast, no impact to LAN)
High reliability and availability (provide hot-swap)
Configuration flexibility (up to 20 km of distance)
Heterogeneous servers (UNIX, NT, NetWare, etc) simultaneously.
Reduced Total-Cost-of-Ownership (TCO)
– Shared tape libraries are more efficiently utilized.
– Centralized management reduces administration cost.
17. 17
USE IMPROVE EVANGELIZE
Types of Backup
● Full Backups
Copy all files: system files, software files, data files
should be performed on a weekly, bi-weekly, or monthly
basis.
If the data set is small, could be performed on a daily basis.
●
Partial Backups
copies all files that have been added or changed since the
last backup job.
two types of partial backups: incremental and differential
18. 18
USE IMPROVE EVANGELIZE
Incremental Backups
● save time and cost during regular backup jobs
● example:
– perform a regular backup of all files (weekly, bi-weekly,
etc.)
– perform a more frequent backup (daily) of only the files that
have changed since the last backup session.
● Only copy few files and requires less time for backup
● Can make a complete system restore slower (if having many
incremental tapes)
note: incremental backup session may only use a small section
of tape. Using append option will conserve required number of
backup tapes. However, if losing this one tape, means losing
data from several backup sessions.
19. 19
USE IMPROVE EVANGELIZE
Differential Backups
● Quick on restore time
● Example:
perform regular full backup (weekly, bi-weekly, etc.)
perform frequent backup (daily) of all files that have changed
since the last full backup session.
● Efficient on restore process (only need 2 tape sets)
● However, this method is slower on the backup process
note: for big full backup (requires more than one tape), you might
consider investing in a tape autoloader.
20. 20
USE IMPROVE EVANGELIZE
Which Backup Strategy is Best?
Depends on situation! ;-)
NOTE: Most companies perform full/differential backups, because the
restore process only requires 2 tapes (or tape sets).
22. 22
USE IMPROVE EVANGELIZE
Solaris Backup tool: tar
● Tool for archiving
● Example
– # tar -cvf file.tar source (create tar file)
– # tar -tf file.tar (check table of content)
– # tar -xvf file.tar (extract tar file)
note: be careful between relatif and absolute SOURCE PATH
23. 23
USE IMPROVE EVANGELIZE
Solaris Backup tool: ufsdump
● Tool for achiving unmounted volume
● Backup activity will be recorded in /etc/dumpdates
● example:
– # unmount /mnt/mp1 (unmount filesystem)
– # fsck /mnt/mp1 (check filesystem)
– # ufsdump 0uf /dev/rmt/0 /mnt/mp1 (dump to /dev/rmt/0)
– # ufsdump 0uf host2:/dev/rmt/0 /mnt/mp1 (dump to host2)
24. 24
USE IMPROVE EVANGELIZE
Solaris Restore tool: ufsrestore
● Tool to restore data from device
– # newfs /dev/rdsk/c2t0d0s0 (format partition)
– # mount /mnt/mp1 (mount partition)
– # cd /mnt/mp1 (change directory)
– # ufsrestore rvf /dev/rmt/0 (restore from device)
– # rm restoresymtable (delete restoresymtable)
– ufsrestore ivf /dev/rmt/0 (interactive mode)
• Add, delete, marked, extract
Note: When performing differential restores, start with the last fullbackup
first. The system uses restoresymtable file to restore incremental backups
on top of the latest full backup.
25. 25
USE IMPROVE EVANGELIZE
Solaris Backup tool: fssnap
● Create point-in-time copy of UFS filesystem (online backup)
– # fssnap -F ufs -o bs=/export/home/fssnap-file /mnt/mp1
(create snapshot)
– # fssnap -F ufs -o bs=/export/home/fssnap-
file,maxsize=100m /mnt/mp1 (with max backing-store file)
– # fssnap -i (display info)
– # mount -o ro /dev/fssnap/0 /mnt/fssnap0 (mount fs)
– # cd /mnt/fssnap0 (change directory)
– # fssnap -d /mnt/mp1
NOTE
– If the backing-store file runs out of disk space, the system automatically
deletes the UFS snapshot. The active ufs file system is not affected.
Check the /var/adm/messages.
– forcing unmount of an active ufs file system, for which a
snapshot exists (umount -f), will deletes the snapshot automatically.
26. 26
USE IMPROVE EVANGELIZE
Solaris Backup tool: flash archive
● tool to create system image.
● Usually used for network installation
– # flarcreate -n flash_root_archive -c -R / -e root_archive -x /
export/flash -a admin_operator -S /export/flashfile
27. USE IMPROVE EVANGELIZE
Thank you!
Achmad Mardiansyah
Sun Certified Network Administrator
Freelance Engineer
Questions...?