SysAdmin Blog, TechTips and Reviews

An (ex) System Administrator's Blog

Archives Posts

ufsdump – How To Backup Solaris/Linux Root Filesystem

October 11th, 2011 by elizar

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

Filed under Uncategorized having No Comments »

Archives Posts

Restoring File From UFSdump Backup

September 18th, 2008 by elizar

Here’s what we did today on one of our Solaris box that is worth mentioning on this cool super system administrator’s blog ‘o mine! (Don’t you find it cool that SysAds are so funny?!)

Anyhoo, today we re-jumpstarted a laboratory box because the ‘owner’ of it wants it back. Since we pretty much messed it up, I have to jumpstarted a fresh copy.

After installing returned the original /etc/shadow and /etc/passwd back from backup (had a backup file on the laptop).. but unfortunately, the /etc/shadow file is ‘null’.

Restoring File From UFSdump Backup

Here’s the procedure in restoring a particular file from ufs dump backup… Of course if you’re restoring from ufs backup you probably made a ufs backup in the first place, right? Right!

In this example, the files backup.examples and junk are restored from the pubs directory:

Read the rest of this entry »

I was here...