Friday 19 May 2017

Migrate data using the direct copy method

Sometimes you must use the direct copy method to migrate data. This method uses the logical volume manager, which utilizes the UNIX find and cpio commands.

About this task

The find command generates the list of files that are to be migrated. The cpio command migrates the files that are on the list. The example below assumes that you created 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.

Procedure

  1. Mount the logical volume on a temporary mount point (/mnt in the example).
  2. Change directories to the directory at the top of the file system that you want to move (cd/data in the example).
  3. Issue the find command to produce a list of file names, which a pipe (|) passes as standard output to the standard input of the cpiocommand.
  4. Unmount both file systems and mount the new file system over the original mount point directory when the migration is complete.
Example
# mount /dev/lv00 /mnt
# cd /data
#print | cpio -pdmuv /mnt . . .
# find . -
# umount /mnt
# umount /data
# mount /dev/lv00 /data

What to do next

You might be unable to use the volume management methods if the database uses volume serial numbers in its licensing code or uses validity checking. In either of these cases, you might be limited to exporting the database from its old locations or importing 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.

No comments:

Post a Comment