Monday, June 24, 2013

copying Fs content using cpio


1) lets start

2) Move /test/backup to /test/backup.orig

3) Create a backup volume.
vxassist -g testdg make backup 20g
/usr/sbin/mkfs -F vxfs -o largefiles /dev/vx/rdsk/testdg/backup

vxassist -g testdg -U fsgen -b make backup 20g
mkfs -F vxfs -o largefiles /dev/vx/rdsk/testdg/backup

4) Add in /etc/vfstab

5) mount new /test/backup
    chown bkupadm:bkupadm /test/backup

6) Copy the data from /test/backup.orig to /test/backup
cd /test/backup-orig
find . -print | cpio -pdmuv /test/backup

7) Compare the data by following:
a) du -shd  /test/backup.orig
b) du -shd /test/backup

8) find /test/backup.orig -print | wc -l
    find /test/backup -print | wc -l

No comments: