Is it possible to ufsdump to a file instead of a tape device?

Eh... what the title says. :slight_smile:

Yes.

From man ufsdump

ufsdump backs up all files specified by files_to_dump  (nor-
     mally either a whole file system or files within a file sys-
     tem  changed  after  a  certain  date)  to  magnetic   tape,
     diskette, or disk file

Use the f option to specify the dump file

The manual page will tell you more

EDIT: Rereading the original post (and the man page), I believe it must be a disk (i.e. device file), so if you mean backup to a "data" file (such as tar can back up to foo.tar) then I'd say no.

Maybe a Solaris admin can clear this up?

Cheers
ZB

Yes, yes. I was just looking at that. I just needed confirmation. Thanks, Zazzy. :slight_smile:

Er... just saw your revision... We don't have a system administrator here. >_<

But actually, I think it is possible. Doesn't anybody know for sure?

Thanks in advance.

Jim@PSC

I change my tune again.... according to this
it would appear that you can dump to a plain old file, although there is a 2GB limit, so you might have to pipe through compress or gzip if the backup is larger than this.

Cheers
ZB

Never really used ufsdump before other than in a Solaris certification class lab, so I thought I'd give it a try.

Answer is: Yup, it works.

krypton# cd /var/tmp/testdir
krypton# ls
test1 test2
krypton# ufsdump -f dumpfile test1 test2
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 (krypton:/) 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
DUMP: DUMP IS DONE
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

Very cool. According to that thread (thanks ZB), it says that there was a 2 gig limit up to Solaris 2.5, and we're running Solaris 9. Perhaps the size limit has increased dramatically?

What we want to attempt to do now is to ufsdump the entire root directory, and scp it to a Win2k storage device. Hopefully size won't be an issue.

If something were to happen to the unix machine, would this dump file of the root directory be sufficient to restore the system back to its current state (provided we have a solaris 9 boot cd)? And do you guys foresee any problems doing it this way?

I believe its ufsrestore that will do it for you. But only the root directory? What about other mount points that you need to get back to your current state. Is it ok to be without them?

Haha.. :confused:

I was under the impression that dumping the root would include all its subdirectories, like /usr and /home. Seeing as the dump of / only resulted in a 151 mb file tells me this isn't right. :stuck_out_tongue: I suppose I need to dump every mount point. I think I've got it figured out now.

Thanks, everybody.