Discussion Locked

Difference between "tar" & "ufsdump"

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Dear Friend,

what is the difference between "tar" and "ufsdump" backup utility on Solaris ?

What hich is technically better ? and Why ?

Regards

D.V.Bhagwat

7 replies

by andries_burger

Hi, working of the top of my head, 'ufsdump' is used to take an 'image' of a file system. This 'image' can only be restored to another harddrive and system that has the exact same configuration as the system on which the dump was taken. It can be used to take a snap shot of file systems that do not change often to use when replacing failed hardware.

'tar' as the name implies is a 'tape archive'. It is a single file that contains a number of other files. It's main use was for moving files from one system to another useing tapes. It can however be used to create a single file from the contents of directories, much like 'Zip' does in the compression world. Tar, however, does not compress the data. 'gtar' does have an option to compress files on the 'flie'.

Hope this helps.

by dbs

Tar works on files. Ufsdump works on file systems.

Further differences...
1) ufsdump will only work with UFS file systems. Tar will work with any file system your OS recognizes.
2) ufsdump requires that the filesystem be absolutely unchanged while the dump is running. This generally requires the file system to be unmounted. Any changes to the file system during the dump will cause problems when restoring. Tar will work while the FS is mounted and in use.
3) There are versions of TAR available for most computer systems.
4) ufsdump (and other derivitives like vfsdump) do and exact copy, right down to the inodes.

by unixadmin

There are many differences between tar and ufsdump, and they both have there strengths and weaknesses. I primarily use tar to back up smaller files or files that require portability. I use ufsdump to create a disaster recovery policy for my system. (With ufsdump you can do incremental backups.)
There a a few notes that you should be aware of. There have been documented issues with Solaris' version of tar. The issue prevents other systems from opening tar files created by the solaris tar and the inability to open tar files using solaris tar. I would suggest downloading gnu tar. This version of tar has a lot more functionality and is more reliable. If you are going to use ufsdump, you must be sure your file system is offline. If a filechanges during the dump, the dump will be corrupt.
There are two easy ways to take all filesystems offline. (unmounting doesn't work because / and /usr is required to be mounted at all times.) The easiest and most reliable is using the snapshot feature available in solaris 8 and higher. I have created a script to do this if interested. The second way is to unlink half of a mirror if the disk is mirrored.

This discussion is closed to new replies.