Total Pageviews

Sunday, 16 February 2014

Restorations using tar, ufsdump, and vxdump !!!

In this post let us see, how to create dumps and restore them on different servers across a network.

In general for UFS filesystem we use "tar" and "ufsdump" commands to take dump and for VXFS filesystem we use "vxdump" command.

Now let us discuss these three commands with an example.

For example, consider my "source server A - 10.20.10.22" and "destination server B - 10.20.10.23".
Let us say abc filesystem from A to be restored to B.

#############################################################

tar command :


login to server A : 10.20.10.22

bash-3.00# tar -cvf abc.tar /abc/*

login to server B : 10.20.10.23       copy the tar file to B server cd /abc and ,


bash-3.00# tar -xf abc.tar

one line tar command which takes the dump and restores fs to other server by ssh.


login to server A : 10.20.10.22


bash-3.00# tar -cvf - /abc/* | ssh 10.20.10.23 '( cd /abc/; tar -xvf - )'

tar options :  -c ---- create      -v ---- verbose      -f ---- specify destination     -x ---- restore

#############################################################


ufsdump & ufsrestore command :


login to server A : 10.20.10.22


bash-3.00# ufsdump -0uf abc1 /abc

login to server B : 10.20.10.23       copy the dump to B server cd /abc and ,


bash-3.00# ufsrestore -xf abc1

one line ufsdump command which takes the dump and restores fs to other server by ssh.


login to server A : 10.20.10.22


bash-3.00# ufsdump -0uf - /abc | ssh 10.20.10.23 '( cd /abc/; ufsrestore -xf -)'

ufsdump options :  -0 ---- full      -u ---- update     -f ---- specify destination    -x ---- restore

#############################################################

vxdump & vxrestore command :

login to server A : 10.20.10.22

bash-3.00# vxdump -0uf abc1 /abc

login to server B : 10.20.10.23       copy the tar file to B server cd /abc and ,

bash-3.00# vxrestore -xf abc1

one line vxdump command which takes the dump and restores fs to other server by ssh.

login to server A : 10.20.10.22


bash-3.00 vxdump -0uf - /abc | ssh 10.20.10.23 '( cd /abc/; vxrestore -xf -)'

vxdump options :  -0 ---- full      -u ---- update     -f ---- specify destination    -x ---- restore

#############################################################

2 comments:

  1. After the vxrestore -xf abc1 command I get :
    UX:vxfs vxrestore: WARNING: V-3-22477: warning: ./lost+found: File exists...and for every file that exist and after that I'm promp[ted to specify the next volume:
    Specify next volume #:

    What that volume # means?

    SHould I restore the partition from within or without the partition?

    ReplyDelete
    Replies
    1. First of all I am sorry for the late reply, somehow I overlooked.
      Make sure about the destination host and location. It may contain few files already.

      In destination try to move old directory to some different directory, create a new directory and try to restore one more time.

      Delete