分类:
2006-12-29 10:19:27
1. 系统解压缩
(1) tar cvf file.tar file(*) 建立压缩文件file.tar
(2) compress file.tar 生成压缩文件file.tar.Z
(3) gzip file.tar 生成压缩文件file.tar.gz
(4) tar zcvf file.tar file(*) 生成压缩文件file.tar.gz
2. cpio
(1) cpio –i copy in mode
(2) cpio –o copy out mode
(3) cpio –p copy pass mode
3. dd
用来复制裸设备,如if(in file)of(out file)
server# dd if=/dev/rdsk/c1t0d0s0 of=/dev/rdsk/c1t4d0s0 bs=128k
server# dd if=/dev/rmt/0h of=/dev/rmt/1h
4. ufsdump
# ufsdump 0cu /dev/rmt/0 /dev/rdsk/c0t0d0s0
0:备份级别0 c:(cartridge: blocking factor126) u:u (updates the dump record /etc/dumpdates) /dev/rmt/0:目标设备 /dev/rdsk/c0t0d0s0:源设备
DUMP: Writing 63 Kilobyte records
DUMP: Date of this level 0 dump: Mon Feb 03
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rdsk/c0d0s0 (solaris:/) to /dev/rmt/0.
DUMP: Mapping (Pass I) [regular files]
DUMP: Mapping (Pass II) [directories]
DUMP: Estimated 46998 blocks (22.95MB).
DUMP: Dumping (Pass III) [directories]
DUMP: Dumping (Pass IV) [regular files]
DUMP: 46996 blocks (22.95MB) on 1 volume at 1167 KB/sec
DUMP: DUMP IS DONE
DUMP: Level 0 dump on Mon Feb 03
server# cat /etc/dumpdates
/dev/rdsk/c0t0d0s0 0 Wed Feb 2
/dev/md/rdsk/d0 0 Tue Feb 1
/dev/md/rdsk/d2 0 Tue Feb 1
/dev/md/rdsk/d3 0 Wed Feb 2
/dev/rdsk/c0t0d0s3 0 Wed Feb 2
/dev/md/rdsk/d1 0 Wed Feb 2
/dev/rdsk/c0t0d0s4 0 Wed Feb 2
/dev/rdsk/c2t3d0s2 0 Wed Feb 2
/dev/rdsk/c0t2d0s3 0 Wed Feb 2
5. ufsrestore
# ufsrestore xf /dev/rmt/0
从/dev/rmt/0上解压恢复数据
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
set owner/mode for '.'? [yn] y
# ufsrestore tf /dev/rmt/0 从/dev/rmt/0查看数据
1 ./openwin/devdata/profiles
2 ./openwin/devdata
3 ./openwin
9 ./lp/alerts
1 ./lp/classes
15 ./lp/fd
1 ./lp/forms
# ufsrestore I 交互式模式
ufsrestore > help
Available commands are:
ls [arg] - list directory
cd arg - change directory
pwd - print current directory
add [arg] - add `arg' to list of files to be extracted
delete [arg] - delete `arg' from list of files to be extracted
extract - extract requested files
setmodes - set modes of requested directories
quit - immediately exit program
what - list dump header information
verbose - toggle verbose flag (useful with ``ls'')
help or `?' - print this list
If no `arg' is supplied, the current directory is used
ufsrestore >