ufsdump – How To Backup Solaris/Linux Root Filesystem

Alright, here’s how – usfsdump – How To Backup Solaris/Linux Root Filesystem. use ufsdump

Say for example you have this:

$ df -k /
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 673951 415497 197799 68% /
$ df -k /CMS
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t8d0s0 35009161 32305691 2353379 94% /CMS

yeah, the /CMS file system is almost full, but I think it can still accomodate a 674MB root filesystem from the slice /dev/dsk/c0t0d0s0, right?

Anyway, not sure if the 2GM limit is applicable to Solaris 8,9 or 10 but since this example is less than 1GB, we are ok to proceed.

myserver# cd /CMS
myserver# ufsdump -f dumpfile /dev/dsk/c0t0d0s0
DUMP: Date of this level 0 dump: Tue Jul 20 16:41:50 2004
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rdsk/c0t0d0s0 (myserver:/) to dumpfile.
DUMP: Mapping (Pass I) [regular files]
DUMP: Mapping (Pass II) [directories]
DUMP: Writing 32 Kilobyte records
DUMP: Estimated 366 blocks (183KB).
DUMP: Dumping (Pass III) [directories]
DUMP: Dumping (Pass IV) [regular files]
DUMP: 318 blocks (159KB) on 1 volume at 963 KB/sec
krypton# ls -l
total 340
-rw——- 1 root other 163840 Jul 20 16:41 dumpfile
-rw-r–r– 1 haefnr2 instrume 11 Jul 20 16:38 test1
-rw-r–r– 1 haefnr2 instrume 21 Jul 20 16:38 test2
krypton# file dumpfile
dumpfile: ufsdump archive file

ufsrestore should do the trick in recovering the system.. hopefully

Leave a Reply

Your email address will not be published. Required fields are marked *