migration copy — Copies files to other pools.
migration copy
[<options>] <target>...
Copies files to other pools. Unless filter options are specified, all files on the source pool are copied.
The operation is idempotent, that is, it can safely be repeated without creating extra copies of the files. If the replica exists on any of the target pools, then it is not copied again. If the target pool with the existing replica fails to respond, then the operation is retried indefinitely, unless the job is marked as eager.
Please notice that a job is only idempotent as long as the set of target pools does not change. If pools go offline or are excluded as a result of an exclude or include expression then the job may stop being idempotent.
Both the state of the local replica and that of the target replica can be specified. If the target replica already exists, the state is updated to be at least as strong as the specified target state, that is, the lifetime of sticky bits is extended, but never reduced, and cached can be changed to precious, but never the opposite.
Transfers are subject to the checksum computiton policy of the target pool. Thus checksums are verified if and only if the target pool is configured to do so. For existing replicas, the checksum is only verified if the verify option was specified on the migration job.
Jobs can be marked permanent. Permanent jobs never terminate and are stored in the pool setup file with the save command. Permanent jobs watch the repository for state changes and copy any replicas that match the selection criteria, even replicas added after the job was created. Notice that any state change will cause a replica to be reconsidered and enqueued if it matches the selection criteria — also replicas that have been copied before.
Several options allow an expression to be specified. The
following operators are recognized: <
,
<=
, ==
,
!=
, >=
,
>
, lt
,
le
, eq
,
ne
, ge
,
gt
, ~=
,
!~
, +
,
-
, *
,
/
, %
,
div
, mod
,
|
, &
,
^
, ~
,
&&
, ||
,
!
, and
,
or
, not
,
?:
, =
. Literals may be
integer literals, floating point literals, single or double
quoted string literals, and boolean true and false. Depending
on the context, the expression may refer to constants.
Please notice that the list of supported operators may
change in future releases. For permanent jobs we recommend to
limit expressions to the basic operators
<
, <=
,
==
, !=
,
>=
, >
,
+
, -
,
*
, /
,
&&
, ||
and
!
.
Options
Only copy replicas accessed <n>
seconds ago, or accessed within the given, possibly
open-ended, interval;
e.g. -accessed=0..60
matches files
accessed within the last minute;
-accesed=60..
matches files accessed
one minute or more ago.
Only copy replicas with the given access latency.
Only copy replicas with one of the given PNFS IDs.
Only copy replicas with the given retention policy.
Only copy replicas with size <n>, or a size within the given, possibly open-ended, interval.
Only copy replicas in the given state.
Only copy sticky replicas. Can optionally be limited to the list of owners. A sticky flag for each owner must be present for the replica to be selected.
Only copy replicas with the given storage class.
Specifies how many concurrent transfers to perform. Defaults to 1.
Sort transfer queue. By default transfers are placed in ascending order, that is, smallest and least recently used first. Transfers are placed in descending order if the key is prefixed by a minus sign. Failed transfers are placed at the end of the queue for retry regardless of the order. This option cannot be used for permanent jobs. Notice that for pools with a large number of files, sorting significantly increases the initialization time of the migration job.
Sort according to file size.
Sort according to last access time.
Controls how sticky flags owned by the PinManager
are handled:
Ask PinManager
to move pins to the target
pool.
Keep pins on the source pool.
Update the local replica to the given mode after transfer:
does not change the local state (this is the default).
marks it cached.
marks it precious.
marks it cached and strips all existing sticky flags exluding pins.
deletes the replica unless it is pinned.
An optional list of sticky flags can be specified. The lifetime is in seconds. A lifetime of 0 causes the flag to immediately expire. Notice that existing sticky flags of the same owner are overwritten.
Set the mode of the target replica:
applies the state and sticky bits excluding pins of the local replica (this is the default).
marks it cached.
marks it precious.
An optional list of sticky flags can be specified. The lifetime is in seconds.
Copy replicas rather than retrying when pools with existing replicas fail to respond.
Exclude target pools. Single character
(?
) and multi character
(*
) wildcards may be used.
Exclude target pools for which the expression evaluates to true. The expression may refer to the following constants:
pool name
space cost
cpu cost
free space in bytes
total space in bytes
removable space in bytes
used space in bytes
Only include target pools matching any of the
patterns. Single character (?
) and
multi character (*
) wildcards may be
used.
Only include target pools for which the expression evaluates to true. See the description of -exclude-when for the list of allowed constants.
Specifies the period in seconds of when target pool information is queried from the pool manager. The default is 300 seconds.
Determines how a pool is selected from the set of target pools:
selects a pool with a probability inversely proportional to the cost of the pool.
selects the pool with the lowest cost.
selects a pool randomly.
The default is proportional.
Determines the interpretation of the target names. The default is ’pool’.
Pauses the job when the expression becomes true. The job continues when the expression once again evaluates to false. The following constants are defined for this pool:
The number of files remaining to be transferred.
The number of bytes remaining to be transferred.
Pool name.
Space cost.
CPU cost.
Free space in bytes.
Total space in bytes.
Removable space in bytes.
Used space in bytes.
The number of target pools.
Mark job as permanent.
Terminates the job when the expression becomes true. This option cannot be used for permanent jobs. See the description of -pause-when for the list of constants allowed in the expression.