Thursday, October 13, 2005

dump info from interactive ufsrestore

what

Tuesday, September 13, 2005

Why fssnap?

If cannot bring system to "init s" before backing up

ufsdump incremental snapshot (5)

1) fssnap -F ufs -o bs=/var/tmp,unlink /export/home
2) ufsdump 0ufN /dev/rmt/0 /dev/rdsk/c0t0d0s7 /dev/rfssnap/0
* 0 dumps all; N updates /etc/dumpdates with c0t0d0s7 and not rfssnap
3) fssnap -d /export/home
4) recreate snapshot
5) ufsdump 1ufN /dev/rmt/0 /dev/rdsk/c0t0d0s7 /dev/rfssnap/0
* 1 dumps increment against the device specified after N flag

Check ufsdump backup

ufsdump tf /dev/rmt/0

Back up snapshot with tar

1) mount -F ufs -o ro /dev/fssnap/0 /export/bak ; cd /export/bak
2) tar cvf /dev/rmt/0 .

Two facts on snapshots

1) During creation, file system is read-only.
2) File system is consistent, but not application data.

Two ways to list snapshots (brief and long)

fssnap -i
/usr/lib/fs/ufs/fssnap -i

Proper options for snapshots

-o bs=/var/tmp,unlink
* bs -> backing-store file
* unlink automatically deletes the file when not needed

ufsrestore i -> list commands

help

ufsrestore i -> restore now

extract

ufsrestore i -> display added

marked

ufsrestore i -> remove added

delete

/ (root) and /usr need to be restored from

boot cdrom -s

After restoring /(root)

installboot /usr/platform/`uname -m`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0

Restore only file1 and file2

ufsrestore x file1 file2

List files on tape

ufsrestore t

File used to pass info among incremental restores

restoresymtable

Monday, September 12, 2005

Steps to ufsrestore (5)

1) newfs /dev/rdsk/c0t0d0s7
2) mount /dev/dsk/c0t0d0s7 /export/home ; cd /export/home
3) ufsrestore rf /dev/rmt/0
4) rm restoresymtable
5) ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s7
* always back up the new fs - ufsrestore makes changes
* restoresymtable is a temp file for ufsrestore

ufsdump on remote tape

ufsdump 0uf host:/dev/rmt/0 /export/home
* every client must be in ~/.rhosts

Steps to ufsdump /export/home (4)

1) init s
2) umount /export/home
3) fsck /export/home
4) ufsdump

Determine space requirement of ufsdump

ufsdump 0S /dev/rdsk/c0t0d0s0
* S calculates space needed
* useful for incremental backups

Status about the tape

mt status

Five values of tape compression

l low
m medium
h high
c compressed
u ultra compressed

* /dev/rmt/0c uses compression

Two best tapes

DLT - digital linear tape
LTO - linear tape open