Can usfdump be used for backing up 1 directory?

I know I can use ufsdump to backup a full device, but can I use it to just backup specified directories within the device? If so , how? (The man pages do not mention how to do that).

If ufsdump can not do it, what are my choices?

Thank you!

ufsdump backs up a filesystem. You could create a small filesystem with no subdirectories! :smiley:

Seriously, tar or cpio both possible. I like tar myself.

Which one is easier for quick/simple backup/restores of individual files from a directory? Tar or cpio?

Thanks!

I say tar. Others might say cpio.

Just for the sake of completeness, ufsdump(1M) does permit backups of individual subdirectories in a filesystem. For instance, to backup the "/etc/inet" subdirectory:

# ufsdump 0f /dev/rmt/0 /etc/inet

This is a subdirectory on the root filesystem, but only the specified files/directories are ufsdumped... not the entire root filesystem.

Keep in mind that the entire directory structure of the specified files/directories is backed up (and restored.)

FWIW.

Matt

Hi,

I am using ufsdump to full backup harddisk of Sun to one TAPE which is assumed to have enough space for data 05 partitions:

# more /etc/vfstab
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/dev/dsk/c1t0d0s6 /dev/rdsk/c1t0d0s6 /usr ufs 1 no -
/dev/dsk/c1t0d0s4 /dev/rdsk/c1t0d0s4 /var ufs 1 no -
/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /mmf ufs 2 yes -
/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /opt ufs 2 yes -

Should I just use 01 command to backup 05 partitions like:
# ufsdump 0ucf /dev/rmt/0 / /usr /var /mmf /opt

or I have to perform 05 commands for each like:
# ufsdump 0ucf /dev/rmt/0 /
# ufsdump 0ucf /dev/rmt/0 /usr
# ufsdump 0ucf /dev/rmt/0 /var
# ufsdump 0ucf /dev/rmt/0 /mmf
# ufsdump 0ucf /dev/rmt/0 /opt

Appreciate all your help.