Using the direct copy method

Use the following information as a guide for how to use the direct copy method to migrate data.

There are times when you must use the direct copy method to migrate data. While this method uses the logical volume manager, the primary focus is on the use of the UNIX find command and the cpio command. The find command generates the list of files to be migrated. The cpio command migrates the files on the list.

The easiest way to produce the list of files is with the UNIX find command. Pipe its standard output to the standard input of the cpio command. The following output shows a typical example of using the cpio command to move data.
# mount /dev/lv00 /mnt
# cd /data
# find . -print | cpio -pdmuv /mnt
 .
 .
 .
# umount /mnt
# umount /data
# mount /dev/lv00 /data
For the example above, the following considerations can apply:
  • Assume that you made a file system on the /dev/lv00 logical volume. AIX LVM uses this file system to view part or all the virtual disks that the storage unit has made available to the system.
  • Mount the logical volume on a temporary mount point, in this case/mnt.
  • Change directories to the directory at the top of the file system that you want to move (cd/data).
  • Use the find command to produce a list of file names, which a pipe (|) passes to the cpio command.
  • Unmount both file systems and mount the new file system over the original mount point directory when the migration is complete.

You will probably be unable to use the volume management methods if the database uses volume serial numbers in its licensing code or validity checking. If the database uses licensing methods or validity checking, you might be able to only export the database from its old locations or import the database to its new location.

The database software provides the mechanism to move the data. This can take the form of a standard database backup and restore if it does not have any specific tools for moving data.

Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2004, 2007. All Rights Reserved.