Unix Tech Tips

4. Backup file system using  ufsdump
ufsdump 0cvf /dev/rmt/0 /dev/rdsk/c0t0d0s0
or
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
or
gunzip filename

Pages: 1 2 3 4 5 6

Leave a Reply

Your email address will not be published. Required fields are marked *