migratedata

Migrates data to SAN File System.

Read syntax diagramSkip visual syntax diagram
>>-migratedata-- –log--filename--+-------+-------------------->
                                   '- –f-'

   .-------------------------------------------------------------------------.
   V                                                                         |
>----+---------------------------------------------------------------------+-+-->
     |            .-migrate--+-------------------------+--+------------+-. |
     |            |          '- –checkpoint--blocks -'  '- –resume-' | |
     '- –phase--+-plan-------------------------------------------------+-'
                  '-verify--+----------+---------------------------------'
                            '- –data-'

                                      .-------------.
                                      V             |
>-- –destdir--dest_directory_name ----source_path-+----------><

Parameters

–log filename
Specifies the location of a file in which to log migration activities, warnings, and errors. When used with the –plan migrate –resume parameter, the –log parameter specifies the log file from which to read information about the last completed block or file.
Attention: You must specify the correct log file with migrate –resume and verify that the source and destination directories specified on the command line match those in the log file.
  • If you specify an incorrect log file and the –f parameter, –resume displays a warning and overwrites the target file-system data with wrong information.
  • If you specify an incorrect log file, but do not specify the –f parameter, this command displays an error and exits.
–f
Specifies that the migration should continue even if there is an error with a file. If specified with the –phase migrate parameter, this command skips any files with errors, but continues with the migration process. If not specified, an error results in the entire migration being stopped before the file that caused the error. You can then restart the migration after fixing the error.

If specified with the –phase verify parameter, this command adjusts any missing metadata attributes, such as permissions and times. If there is a mismatch in size, however, this command will not try to readjust the metadata attributes.

–phase
Specifies the migration phase to run. Choices include:
plan
Gathers information about the available system resources (available memory, number of CPUs, size of the source tree and space available on the destination file system), copies sample files from source directory to estimate transfer rates, and provides an estimated time for the migration of the data set.
migrate
Reads data from source file system and writes the data to the destination file system. Although not required, for large data sets, you should run this command in planning mode first. You can stop the migration process at any point and resume from the last completed file or block (using the –resume parameter).

This is the default value.

verify
Verifies the integrity of the migrated data using the Message Digest 5 verification algorithm on the contents of the file, as well as verifying consistency of the metadata (such as owner and modification time stamp settings) between the source and destination files.

You can specify more than one phase. For example, to plan, migrate, and verify the data, specify –phase plan –phase migrate –phase verify. Although you can specify the phases in any order, this command always estimates the completion time, migrates data, and then verifies the migrated data.

If the –phase parameter is not specified, this command runs only the migration phase.

–checkpoint blocks
Shows the progress when migrating large files. If you specify this parameter, the migratedata command writes a checkpoint in the log file after each specified number of blocks of a file has been migrated. (The block size depends on the client platform.) For example, if you specify –checkpoint 20, this command makes an entry in the log file each time 20 blocks of file data is migrated. On a platform with a block size of 16 MB, this command writes to the log file after each 320 MB of data from a file has been migrated.

If the migration process is interrupted, this parameter allows you to resume the migration at the place it left off.

If unspecified, the migratedata command makes an entry in the log file after each complete file has been migrated. You can resume the migration at the point of the last migrated file.

–resume
Resumes the migration from the last completed block or file (logged in the log file specified by the –log parameter). If the log file indicates that some files in the source directory are migrated and this parameter is not specified, this command restarts the migration process from the beginning (performs a fresh migration).
–data
Verifies every block of source data (file data and metadata) with the destination data. If not specified, this command verifies only the metadata unless there is a mismatch in the file attributes, in which case this command then verifies the file data.
Note: Verifying all data is very time consuming and can take as long as the migration itself.
–destdir dest_directory_name
Specifies the name of the destination directory for the migrated data. The directory can either exist or be a new directory name. IBM® recommends that you create the directory before beginning the migration process. If the directory does not exist, this command creates the directory using the default permissions.
source_path
Specifies one or more paths of directories or files to migrate.

Prerequisites

You must have root privileges on a UNIX®-based client or Administrative privileges on Windows® to use this command.

You must run this command from the /usr/tank/migration/bin directory.

All storage pools, all filesets, and at least one policy must be set up. All activity (from applications, such as database servers and application servers, or users) that modifies data on the source and destination file systems must be stopped and remain stopped to guarantee consistency of the migrated data.

The destination directory must exist with correct set of permissions and appropriate storage policies must be configured.

Example

Migrating data This example migrates data from the work/capital directory on the client machine to the sanfs/cnt1 directory in the global namespace. A checkpoint is written to the mgrt_capital.log log file each time 20 blocks of file data is migrated.
migratedata –log /mgrtlogs/mgrt_capital.log –phase migrate –checkpoint 20
–destdir /mnt/tank/sanfs/cnt1 work/capital

Parent topic: Common client commands

Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.