Unix OS AIX Backup and Restore OS/Data command useful

** Myself
Backup AIX
-System backup = rootvg
-Volume group backup = vg(data)
-File system Backup = /mount point
-File & directory backup
Backup rootvg
edit file /image.data /bosinst.data
mksysb image= kernel + /image.data,/bosinstdata + dummy toc + rootvg
smit sysbackup --or-- smit mksysb
mksysb

Restore rootvg
70 Gb --> shrinkfile opton 36 Gb
allocate used allocate used
/ 10 G 1G /1G /1Gb
Restoring a mksysb
boot cd --> 3 start maintenance mode -->4 install from a system backup --> choose device-->2 change/show -->choose disk,shrink
Backup vg
smit savevg
Restoring vg
smit restvg

backup by file name (backup) !!relative vs full path is not same
find . |backup -iqvf /dev/rmt0
--or--
smit backfile

backup file system by inode
levels 0 =full,1 increment 0 ,2 increment 1(Not 0)
-u updataes file /etc/dumpdates
backup -u -1 -f /dev/rmt0 /home
--or--
smit backupfilesys
Restore backup file system
List files on media(verify the backup)
restore -Tvf /dev/rmt0
Restore individual
restore -xvf /dev/rmt0 /home/test
Restore complete file system(if incremental use 0 then restore 1,2,3...)
restore -rqvf /dev/rmt0
Restore attributes withow restoring file content
restore -Pa -vf /dev/rmt0 ./etc/passwd

-- or --
smit restfile

control tape
tctl -f /dev/rmt0 rewind
tctl -f /dev/rmt0.1 fsf 3
tctl -f /dev/rmt0 rewoffl (rew and ejects)
tctl -f /dev/rmt0 offline (eject)

0 comments:

Loading