Unit 7 Backup and Restore
Unit 7 Backup and Restore
Unit 7 Backup and Restore
• From the SMS Menu, boot the system from the tape device.
• Restore mksysb image from the device, that is, tape
(/dev/rmt0), as follows:
Welcome to Base Operating System
Welcome to Base Operating System
Installation and Maintenance
Installation and Maintenance
1 Start Install Now With Default Settings
1 Start Install Now With Default Settings
2 Change/Show Installation Settings and Install
2 Change/Show Installation Settings and Install
>> 3 Start Maintenance Mode for System Recovery
>> 3 Start Maintenance Mode for System Recovery
4 Configure Network Disks (iSCSI)
4 Configure Network Disks (iSCSI)
• AIX
– Backup and restore
• Compression Utilities
– Compress, restore using uncompress or zcat
– gzip, restore using gunzip
## find
find /home/aix
/home/aix || backup
backup -iqvf
-iqvf /dev/rmt0
/dev/rmt0 Relative Paths
## cd
cd /home/aix
/home/aix
## find
find .. || backup
backup -iqvf
-iqvf /backup/aix.backup
/backup/aix.backup
List files
## restore
restore -Tvf
-Tvf /backup/aix.backup
/backup/aix.backup
Extract (restore)
files
## restore
restore -xvf
-xvf /backup/aix.backup
/backup/aix.backup
## restore
restore -xvf
-xvf /tmp/aix.backup
/tmp/aix.backup ./file1
./file1 Extract individual
file
## backup
backup -u
-u -0
-0 -f
-f /tmp/databkup_21Oct_level0
/tmp/databkup_21Oct_level0 /data
/data
## backup
backup -u
-u -1
-1 -f
-f /tmp/databkup_21Oct_level1
/tmp/databkup_21Oct_level1 /data
/data
## cat
cat /etc/dumpdates
/etc/dumpdates
/dev/rfslv00
/dev/rfslv00 11 Tue
Tue Oct
Oct 21
21 15:45:21
15:45:21 2008
2008
/dev/rfslv00
/dev/rfslv00 0 Tue Oct 21 15:40:54 2008
0 Tue Oct 21 15:40:54 2008 Incremental backup
Backup history
## restore
restore -rqvf
-rqvf /tmp/databkup_21Nov_level0
/tmp/databkup_21Nov_level0
## restore
restore -rqvf
-rqvf /tmp/databkup_21Nov_level1
/tmp/databkup_21Nov_level1
## find
find .. -depth
-depth || cpio
cpio -pd
-pd /mydir
/mydir
## compress
compress -v
-v /tmp/data.tar
/tmp/data.tar
/tmp/data.tar:
/tmp/data.tar: Compression:
Compression: 95.50%
95.50% This
This file
file is
is replaced
replaced
with /tmp/data.tar.Z.
with /tmp/data.tar.Z.
## uncompress
uncompress /tmp/data.tar.Z
/tmp/data.tar.Z
/tmp/data.tar.Z:
/tmp/data.tar.Z: This
This file
file is
is replaced
replaced with
with /tmp/data.tar.
/tmp/data.tar.
zcat, expands a
## zcat
zcat /tmp/data.tar.Z
/tmp/data.tar.Z || tar
tar -xvf
-xvf -- compressed file to
standard out.
## gunzip
gunzip -v
-v /tmp/data.tar.gz
/tmp/data.tar.gz
/tmp/data.tar.gz:
/tmp/data.tar.gz: 97.7%
97.7% --
-- replaced
replaced with
with
/tmp/data.tar
/tmp/data.tar
Creates a
compressed
## tar
tar -cvf
-cvf -- /data
/data || gzip
gzip -c
-c >> data_tar.gz
data_tar.gz tarball (.tar.gz) of
the /data
## gunzip
gunzip -c
-c data_tar.gz
data_tar.gz || tar
tar xvf
xvf -- directory.
Decompresses and
extracts the
compressed tarball
(.tar.gz).