Thursday, February 7, 2013

ufsdump/ufsrestore Solaris 10

Solaris 10, ufsdump to disk, ufsrestore from disk


UFSDUMP

To backup my 100mb ufs filesystem mounted under the /mnt I did the following steps:






1. estimate the size of the backup file

    

     it is in bytes.
     0- full backup
     S- estimate the needed space.

2. umount the /mnt filesystem.
    The filesystem must be inactive and unmounted or else your backup would be inconsistent.

3. take the backup



0- full backup
u - update the /etc/dumpdates file with the backup information. It could be really helpful in case of having different levels of backups.
                cat /etc/dumpdates
                      /dev/rdsk/c1t1d0s0               0 Thu Sep 20 13:44:02 2012
f - use a file to dump to.
/dev/dsk/c1t1d0s0  - my disk that keeping the unmounted filesystem.
/backup/backup.ufs - the backup file




UFSRESTORE
First I deleted all my files under the /mnt
# rm -rf /mnt/*
The /mnt is mounted.

1. check the contents of your backup file


 2. navigate under the /mnt
     cd /mnt
 3. restore your files

     -r restore the entire filesystem
     -f specify the filename
 4. check the restored files

No comments:

Post a Comment