Unix Tech Tips

4. Backup file system using  ufsdump
ufsdump 0cvf /dev/rmt/0 /dev/rdsk/c0t0d0s0
ufsdump 0cvf   /dev/rmt/0  /usr

To restore a dump with ufsrestore
ufsrestore rvf  /dev/rmt/0

ufsrestore in interactive mode allowing selection of individual files and directories using add , ls , cd , pwd and extract commands .
ufsrestore -i  /dev/rmt/0

Making a copy of  a  disk slice using ufsdump
ufsdump 0f – /dev/rdsk/c0t0d0s7 |(cd /mnt/backup ;ufsrestore xf -)

Backing up all files in a directory including subdirectories  to a tape device (/dev/rmt/0),
tar cvf  /dev/rmt/0   *

Viewing a tar backup on a tape
tar tvf /dev/rmt/0

Extracting tar backup from the tape
tar xvf /dev/rmt/0
(Restoration will go to present directory or original backup path depending on relative or  absolute  path names used for backup )

Backup using cpio
find  . -depth  -print | cpio -ovcB > /dev/rmt/0

Viewing cpio files on a tape
cpio -ivtB < /dev/rmt/0

Restoring a cpio backup
cpio -ivcB < /dev/rmt/0

Compressing  a file
compress -v file_name

gzip   filename
To uncompress a file
uncompress file_name.Z
gunzip filename


This site uses Akismet to reduce spam. Learn how your comment data is processed.