Documente Academic
Documente Profesional
Documente Cultură
Recover files
"I've just deleted file abc by mistake"
Compare versions fof r ofiles
m
l
eria fixed in 6.0.22"
"I'm sure itatwas
M
AIXsystem after disaster
Recover
S that the plumber has been in ..."
BTnow
"well
Restore archived data
"you remember that project we did in 1997 ..."
Shrink a file system
Types of Backup
BTS
Incremental
Records changes since previous backups
Must be used carefully
Very quick
Backup Strategy
Backup all data that changes!
System backup
f ro m
ri a l
at e
M
AIX Full backup
BTS
Incremental backup
Incremental backup
Backup Devices - Diskette
/dev/fd0 Built in 3 1/2" diskette drive
/dev/fd1 Second diskette drive
f ro m
ri a l
at e
M Drive
AIX
BTS 3 1/2"(1.44) 3 1/2"(2.88)
/dev/fdxl 720 KB 720 KB
/dev/fdxh 1.44 MB 2.88 MB
/dev/fdx.9 720 KB 720 KB
/dev/fdx.18 1.44 MB 1.44 MB
/dev/fdx.36 - 2.88 MB
Backup Devices - Tape
4 mm DAT 1/2 - inch
8 mm DLT
l f r
Low om Retension on Rewind on
e ria
IX Mat Capacity Open Close
A
/dev/rmtx S no no yes
BT
/dev/rmtx.1 no no no
/dev/rmtx.2 no yes yes
/dev/rmtx.3 no yes no
/dev/rmtx.4 yes no yes
/dev/rmtx.5 yes no no
/dev/rmtx.6 yes yes yes
/dev/rmtx.7 yes yes no
Backup Device - Read/Write Optical Drive
f ro m
System Backup Manager
ri a l
M ate
AIX
File Systems Files and Directories
Back up a File System Back up a File or Directory
B aSFile System
T
Restore
List Contents of a Backup
Restore a File or Directory
List Contents of a Backup
BTS LANG=C
#Command used for vg_data, /usr/sbin/lsvg
lsvg_data:
VGNAME=rootvg
PPSIZE=4
VARYON=yes
VG_SOURCE_DISK_LIST=hdisk0 hdisk1
#Command used for source_disk_data: /usr/sbin/bootinfo
source_disk_data: (stanza is repeated for each disk in rootvg)
LOCATION=(disk location)
SIZE_MB=(size of disk in megabytes)
HDISKNAME=(disk name)
#Command used for lv_data; /usr/sbin/lslv
lv_data: (stanza for each logical volume in rootvg)
.
.
fs_data: (stanza for each MOUNTED filesystem in rootvg)
/bosinst.data File for rootvg
control_flow:
CONSOLE =
INSTALL_METHOD = overwrite
PROMPT = yes
EXISTING_SYSTEM_OVERWRITE = no
INSTALL_X_IF_ADAPTER = yes
RUN_STARTUP = yes
RM_INST_ROOTS = no f ro m
ERROR_EXIT =ri a l
at e
CUSTOMIZATION_FILE =
M
AIX
TCB = no
INSTALL_TYPE =
BTS
BUNDLES =
RECOVER_DEVICES = yes
BOSINST_DEBUG = no
ACCEPT_LICENSES =
INSTALL_64BIT_KERNEL = no
INSTALL_CONFIGURATION = Default
DESKTOP = CDE
target_disk_data:
LOCATION =
SIZE_MB =
HDISKNAME =
locale:
BOSINST_LANG =
CULTURAL_CONVENTION =
MESSAGES =
KEYBOARD =
rootvg Image Backup
# smit mksysb
Back Up the System
AIX
result in the loss of all material
previously stored on the selected
BTS output medium. This command backs
up only rootvg volume group.
f ro m
1 l
Start Install Now With Default Settings
ri a
2 at e
Change/Show Installation Settings and Install
>> 3 M Start Maintenance Mode for System Recovery
AIX
BTS
Maintenance
ro m
Type the number of your choice and press Enter. Choice is indicated by >>.
f
1 ri a l
Start Install Now With Default Settings
>> 2 at e
Change/Show Installation Settings and Install
M
AIX
3 Start Maintenance Mode for System Recovery
BTS
System Backup Installation and Settings
Type the number of your choice and press Enter.
f ro m
ri a l
Type or select values in entry fields.
ate
Press Enter AFTER making all desired changes.
M
A IX [Entry Fields]
BTtheSfilesystems?
* Restore DEVICE or FILE [/dev/rmt0] /+
SHRINK no +
PHYSICAL VOLUME names [] +
(Leave blank to use the PHYSICAL VOLUMES listed
in the vgname.data file in the backup image)
Use existing MAP files? yes +
Physical partition SIZE in megabytes [] +#
(Leave blank to have the SIZE determined
based on disk size)
Number of BLOCKS to read in a single input [] #
(Leave blank to use a system default)
Activity:
eria
l f r om
a t
AIX savevg
M
BTS
backup by File Name
-q media is ready
-p from
compressiafiles
l which are less than 2 GB
-v t
verbosee r
Ma - display filenames during backup
AIX
BTS
Filenames are read from standard input
backup by File Name Examples
Read input from a file
#cat listfile
/home/roy/file1
l f r om
/home/roy/file2ateria
M
AIX
/home/roy/file3
# backupT-iqvfS /dev/rmt0 < listfile
B
Use find to generate list
ro m
Type or select values in entry fields.
f
ri a l
Press Enter AFTER making all desired changes.
at e
M [Entry Fields]
AIX
This option will perform a backup by name.
BTS
* Backup DEVICE [/dev/fd0] +/
* FILE or DIRECTORY to backup [.]
Current working DIRECTORY [] /
Backup LOCAL files only? yes +
VERBOSE output? no +
PACK files? no +
Syntax:
backup [-u] [-level] [-f device] filesystem
f ro m
ri a l
Levels provideM ateincremental backups:
IX system back up
-0 FullAFile
S
-1,-2, ...BTbackup changes since level -1
/etc/dumpdates contains a backup history
-u updates /etc/dumpdates
1 2
l from level 0
3 M a4 teria 5 6 7 8 9
X
I 6
Alevel level 6 level 6 level 6 level 3
B TS
10 11 12 13 14 15 16
level 6 level 6 level 6 level 6 level 0
17 18 19 20 21 22 23
level 6 level 6 level 6 level 6 level 3
24 25 26 27 28 29 30
level 6 level 6 level 6 level 6 level 0
31
Backup a File System by Inode
# smit backfilesys
Backup a Filesystem
ro
# restore -Tvf /dev/rmt0
f m
i a l
a t er
IX M
A
RestoreTindividual files.
B S
restore -x [-q] [-v] [-f device] [file1 file2 ..]
f ro m
Type or select values in entry fields.
ri a l
Press Enter AFTER making all desired changes.
M ate
A IX [Entry Fields]
* Restore DEVICE [/dev/fd0] +/
* TargetB TS
DIRECTORY [.] /
FILE or DIRECTORY to restore []
(Leave blank to restore entire archive.)
VERBOSE output? no +
Number of BLOCKS to read in a single input [] #
operation
l f r om
Exercise:
at ria
e Using backup
M
AIX and restore
BTS
Other UNIX backup Commands
dd (device to device)
Makes backup copies that are an exact image
Can also be used for conversions
For example: can convert ASCII to EBCDIC
tar Command
restore -s
from
Check the tape device
l
a t eria
M
IXbackups
KeepAold
BTS
Offsite secure storage
Label tape
Optional
m
ia l froExercise:
Using tar
a t er
M and cpio
AIX
BTS
Checkpoint
1. What is the difference between A and B?
a. find /home/fred | backup -ivf /dev/rmt0
b. cd /home/fred; find . | backup -ivf /dev/rmt0
___________________________________________________
o m
l f r
___________________________________________________
a t e ria
___________________________________________________
M
A IX
2. On a mksysb
S tape if you entered tctl rewind and then tctl
B T
-f/dev/rmt0.1 fsf 3 which element on the tape could you look at?
___________________________________________________
___________________________________________________