.TH xrdcopy 1 "v5.5.3" .SH NAME xrdcp - copy files .SH SYNOPSIS .nf \fBxrdcp\fR [\fIoptions\fR] \fIsource\fR \fIdestination\fR \fIoptions\fR: [\fB--cksum\fR \fIargs\fR] [\fB--debug\fR \fIlvl\fR] [\fB--coerce\fR] [\fB--force\fR] [\fB--help\fR] [\fB--license\fR] [\fB--nopbar\fR] [\fB--posc\fR] [\fB--proxy \fIipaddr\fB:\fIport\fR] [\fB--recursive\fR] [\fB--retry\fR \fItime\fR] [\fB--server\fR] [\fB--silent\fR] [\fB--sources\fR \fInum\fR] [\fB--streams\fR \fInum\fR] [\fB--tpc\fR [\fBdelegate\fR] \fBfirst\fR|\fBonly\fR] [\fB--verbose\fR] [\fB--version\fR] [\fB--xrate\fR \fIrate\fR] [\fB--zip\fR \fIfile\fR] [\fB--dynamic-src\fR] [\fB--infiles\fR \fIfn\fR] [\fB--parallel\fR \fIn\fR] [\fB--allow-http\fR] [\fB--xattr\fR] [\fB--notlsok\fR] [\fB--tlsnodata\fR] [\fB--tlsmetalink\fR] [\fB--zip-mtln-cksum\fR] [\fB--rm-bad-cksum\fR] [\fB--continue\fR] [\fB--xrate-threshold\fR] [\fB--retry-policy\fR] \fIlegacy options\fR: [\fB-adler\fR] [\fB-DS\fR\fIparm string\fR] [\fB-DI\fR\fIparm number\fR] [\fB-md5\fR] [\fB-np\fR] [\fB-OD\fR\fIcgi\fR] [\fB-OS\fR\fIcgi\fR] [\fB-x\fR] .fi .br .ad l .SH DESCRIPTION The \fBxrdcp\fR utility copies one or more files from one location to another. The data source and destination may be a local or remote file or directory. Additionally, the data source may also reside on multiple servers. .SH OPTIONS \fB-C\fR | \fB--cksum\fR \fItype\fR[\fB:\fR\fIvalue\fR|\fIprint\fR|\fIsource\fR] .RS 5 obtains the checksum of \fItype\fR (i.e. adler32, crc32, md5 or zcrc32) from the source, computes the checksum at the destination, and verifies that they are the same. If \fIauto\fR is chosen as the checksum type, xrdcp will try to automatically infer the right checksum type based on source/destination configuration, source file type (metalink, ZIP), and available checksum plug-ins. If a \fIvalue\fR is specified, it is used as the source checksum. When \fIprint\fR is specified, the checksum at the destination is printed but is \fInot\fR verified. .RE \fB-d\fR | \fB--debug\fR \fIlvl\fR .RS 5 debug level: 1 (low), 2 (medium), 3 (high) .RE \fB-F\fR | \fB--coerce\fR .RS 5 ignores locking semantics on the destination file. This option may lead to file corruption if not properly used. .RE \fB-f\fR | \fB--force\fR .RS 5 re-creates a file if it is already present. .RE \fB-h\fR | \fB--help\fR .RS 5 displays usage information. .RE \fB-H\fR | \fB--license\fR .RS 5 displays license terms and conditions. .RE \fB-N\fR | \fB--nopbar\fR .RS 5 does not display the progress bar. .RE \fB-P\fR | \fB--posc\fR .RS 5 requests POSC (persist-on-successful-close) processing to create a new file. Files are automatically deleted should they not be successfully closed. .RE \fB-D\fR | \fB--proxy\fR \fIproxyaddr\fB:\fIproxyport\fR .RS 5 [NOT YET IMPLEMENTED] use \fIproxyaddr\fB:\fIproxyport\fR as a SOCKS4 proxy. Only numerical addresses are supported. .RE \fB-r\fR | \fB--recursive\fR .RS 5 recursively copy all files starting at the given source directory. .RE \fB--retry\fR .RS 5 retry failed copy-jobs. .RE \fB--server\fR .RS 5 runs as if in a server environment. Used only for server-side third party copy support. .RE \fB-s\fR | \fB--silent\fR .RS 5 neither produces summary information nor displays the progress bar. .RE \fB-y\fR | \fB--sources\fR \fInum\fR .RS 5 uses up to \fInum\fR sources to copy the file. .RE \fB-S\fR | \fB--streams\fR \fInum\fR .RS 5 use \fInum\fR parallel data streams to do the transfer (the main stream is in this case not used to carry out the transfer). The maximum value is 15. The default is 0 (i.e., use only the control stream). .RE \fB--tpc\fR [\fBdelegate\fR] \fBfirst\fR|\fBonly\fR .RS 5 copies the file from remote server to remote server using third-party-copy protocol (i.e., data flows from server to server). The source and destination servers must support third party copies. Additional security restrictions may apply and may cause the copy to fail if they cannot be satisfied. Argument '\fBfirst\fR' tries tpc and if it fails, does a normal copy; while '\fBonly\fR' fails the copy unless tpc succeeds. When '\fBdelegate\fR' is specified, the copy delegates the command issuer's credentials to the target server which uses those credentials to authenticate with the source server. Delegation is ignored if the target server is not configured to use delegated credentials. Currently, only gsi credentials can be delegated. .RE \fB-v\fR | \fB--verbose\fR .RS 5 displays summary output. .RE \fB-V\fR | \fB-version\fR .RS 5 displays version information and immediately exits. .RE \fB-z\fR | \fB--zip\fR \fIfile\fR .RS 5 copy given file from a ZIP archive (same as xrdcl.unzip opaque info). .RE \fB-X\fR | \fB--xrate\fR \fIrate\fR .RS 5 limits the copy speed to the specified \fIrate\fB. The rate may be qualified with the letter \fBk\fR, \fBm\fR, or \fBg\fR to indicate kilo, mega, or giga bytes, respectively. The option only applies when the source or destination is local. .RE \fB-X\fR | \fB--xrate-threshold\fR \fIrate\fR .RS 5 If the transfer rate drops below given threshold force the client to use different source or if no more sources are available fail the transfer. .RE \fB-Z\fR | \fB--dynamic-src\fR .RS 5 file size may change during the copy .RE \fB-I\fR | \fB--infiles\fR \fIfn\fR .RS 5 specifies the file that contains a list of input files .RE \fB--parallel\fR \fIn\fR .RS 5 number of copy jobs to be run simultaneously .RE \fB--allow-http\fR .RS 5 allow HTTP as source or destination protocol. Requires the XrdClHttp client plugin .RE \fB--xattr\fR .RS 5 preserve extended attributes .RE \fB--notlsok\fR .RS 5 If server is too old to support TLS encryption fallback to unencrypted communication. .RE \fB--tlsnodata\fR .RS 5 In case of roots/xroots protocol, encrypt only the control stream and leave the data streams unencrypted. .RE \fB--tlsmetalink .RS 5 Treat all URLs in metalink as roots/xroots. .RE \fB--zip-mtln-cksum .RS 5 Use the checksum available in a metalink file even if a file is being extracted from a ZIP archive. .RE \fB--rm-bad-cksum .RS 5 Remove the target file if checksum verification failed (enables also POSC semantics). .RE \fB--continue .RS 5 Continue copying a file from the point where the previous copy was interrupted. .SH LEGACY OPTIONS Legacy options are provided for backward compatibility. These are now deprecated and should be avoided. .RE \fB-adler\fR .RS 5 equivalent to "\fB--cksum adler32:source\fR". .RE \fB-DI\fR\fIpname numberval\fR .RS 5 set the internal parameter \fIpname\fR with the numeric value \fInumberval\fR. .RE \fB-DS\fR\fIpname stringval\fR .RS 5 set the internal parameter \fIpname\fR with the string value \fIstringval\fR. .RE \fB-md5\fR .RS 5 equivalent to "\fB--cksum md5:source\fR". .RE \fB-np\fR .RS 5 equivalent to "\fB--nopbar\fR". .RE \fB-OD\fR\fIcgi\fR .RS 5 add cgi information \fIcgi\fR to any destination xrootd URL. You should specify the opaque information directly on the destination URL. .RE \fB-OS\fR\fIcgi\fR .RS 5 add cgi information \fIcgi\fR to any source xrootd URL. .RE \fB-x\fR .RS 5 equivalent to "\fB--sources 12\fR". .RE .SH OPERANDS \fIsource\fR .RS 5 a dash (i.e. \fB-\fR) indicating stanard in, a local file, a local directory name suffixed by /, or an xrootd URL in the form of .ce 1 \fBxroot://[\fIuser\fB@\fR]\fIhost[\fB:\fIport\fR]\fB/\fIabsolutepath\fR The \fIabsolutepath\fR can be a directory. .RE \fIdestination\fR .RS 5 a dash (i.e. \fB-\fR) indicating stanard out, a local file, a local directory name suffixed by /, or an xrootd URL in the form .ce 1 \fBxroot://[\fIuser\fB@\fR]\fIhost[\fB:\fIport\fR]\fB/\fIabsolutepath\fR The \fIabsolutepath\fR can be a directory. .RE .SH ENVIRONMENT The following environment variables are supported. They apply to xrdfs and any other application using the libXrdCl library, unless specified otherwise. The text in the brackets is a name of the corresponding xrdcp commandline parameter. .br XRD_LOGLEVEL .RS 5 Determines the amount of diagnostics that should be printed. Valid values are: \fIDump\fR, \fIDebug\fR, \fIInfo\fR, \fIWarning\fR, and \fIError\fR. .RE XRD_LOGFILE .RS 5 If set, the diagnostics will be printed to the specified file instead of stderr. .RE XRD_LOGMASK .RS 5 Determines which diagnostics topics should be printed at all levels. It's a "|" separated list of topics. The first element may be "All" in which case all the topics are enabled and the subsequent elements may turn them off, or "None" in which case all the topics are disabled and the subsequent flags may turn them on. If the topic name is prefixed with "^", then it means that the topic should be disabled. If the topic name is not prefixed, then it means that the topic should be enabled. .br The log mask may as well be handled for each diagnostic level separately by setting one or more of the following variables: \fIXRD_LOGMASK_ERROR\fR, \fIXRD_LOGMASK_WARNING\fR, \fIXRD_LOGMASK_INFO\fR, \fIXRD_LOGMASK_DEBUG\fR, and \fIXRD_LOGMASK_DUMP\fR. The default for each level is "All", except for the \fIDump\fR level, where the default is "All|^PollerMsg". This means that, at the \fIDump\fR level, all the topics but "PollerMsg" are enabled. .br Available topics: AppMsg, UtilityMsg, FileMsg, PollerMsg, PostMasterMsg, XRootDTransportMsg, TaskMgrMsg, XRootDMsg, FileSystemMsg, AsyncSockMsg, TlsMsg .RE XRD_TLSDBGLVL .RS 5 Determine the debug level for the TLS component. Valid values are: \fIOFF\fR, \fICTX\fR, \fISOK\fR, \fISIO\fR, \fIALL\fR and \fIOUT\fR. The default value is \fIOFF\fR. .RE XRD_PARALLELEVTLOOP .RS 5 The number of event loops. .RE XRD_READRECOVERY .RS 5 Determines if read recovery should be enabled or disabled (enabled by default). .RE XRD_WRITERECOVERY .RS 5 Determines if write recovery should be enabled or disabled (enabled by default). .RE XRD_OPENRECOVERY .RS 5 Determines if open recovery should be enabled or disabled for mutable (truncate or create) opens (enabled by default). .RE XRD_CONNECTIONWINDOW (-DIConnectionWindow) .RS 5 A time window for the connection establishment. A connection failure is declared if the connection is not established within the time window. If a connection failure happens earlier then another connection attempt will only be made at the beginning of the next window. .RE XRD_CONNECTIONRETRY (-DIConnectionRetry) .RS 5 Number of connection attempts that should be made (number of available connection windows) before declaring a permanent failure. .RE XRD_REQUESTTIMEOUT (-DIRequestTimeout) .RS 5 Default value for the time after which an error is declared if it was impossible to get a response to a request. .RE XRD_STREAMTIMEOUT (-DIStreamTimeout) .RS 5 Default value for the time after which a connection error is declared (and a recovery attempted) if there are unfulfilled requests and there is no socket activity or a registered wait timeout. .RE XRD_SUBSTREAMSPERCHANNEL (-DISubStreamsPerChannel) .RS 5 Number of streams per session. .RE XRD_TIMEOUTRESOLUTION (-DITimeoutResolution) .RS 5 Resolution for the timeout events. Ie. timeout events will be processed only every XRD_TIMEOUTRESOLUTION seconds. .RE XRD_STREAMERRORWINDOW (-DIStreamErrorWindow) .RS 5 Time after which the permanent failure flags are cleared out and a new connection may be attempted if needed. .RE XRD_RUNFORKHANDLER (-DIRunForkHandler) .RS 5 Determines whether the fork handlers should be enabled, making the API fork safe. .RE XRD_REDIRECTLIMIT (-DIRedirectLimit) .RS 5 Maximum number of allowed redirections. .RE XRD_NOTAUTHORIZEDRETRYLIMIT (-dNotAuthorizedRetryLimit) .RS 5 Maximum number of allowed retries at a meta-manager for not-authorized error. .RE XRD_POLLERPREFERENCE (-DSPollerPreference) .RS 5 A comma separated list of poller implementations in order of preference. The default is: built-in. .RE XRD_CLIENTMONITOR (-DSClientMonitor) .RS 5 Path to the client monitor library. .RE XRD_CLIENTMONITORPARAM (-DSClientMonitorParam) .RS 5 Additional optional parameters that will be passed to the monitoring object on initialization. .RE XRD_WORKERTHREADS (-DIWorkerThreads) .RS 5 Number of threads processing user callbacks. .RE XRD_CPPARALLELCHUNKS (-DICPParallelChunks) .RS 5 Maximum number of asynchronous requests being processed by the xrdcp command per connected channel substream (adjusted in real-time). .RE XRD_CPCHUNKSIZE (-DICPChunkSize) .RS 5 Size of a single data chunk handled by xrdcp. .RE XRD_NETWORKSTACK (-DSNetworkStack) .RS 5 The network stack that the client should use to connect to the server. Possible values are: .B IPAuto - automatically detect which IP stack to use .B IPAll - use IPv6 stack (AF_INET6 sockets) and both IPv6 and IPv4 (mapped to IPv6) addresses .B IPv6 - use only IPv6 stack and addresses .B IPv4 - use only IPv4 stack (AF_INET sockets) and addresses .B IPv4Mapped6 - use IPv6 stack and mapped IPv4 addresses .RE XRD_DATASERVERTTL (-DIDataServerTTL) .RS 5 Time period after which an idle connection to a data server should be closed. .RE XRD_LOADBALANCERTTL (-DILoadBalancerTTL) .RS 5 Time period after which an idle connection to a manager or a load balancer should be closed. .RE XRD_APPNAME (-DSAppName) .RS 5 Override the application name reported to the server. .RE XRD_PLUGINCONFDIR .RS 5 A custom location containing client plug-in config files. .RE XRD_PLUGIN .RS 5 A default client plug-in to be used. .RE XRD_CPINITTIMEOUT (-DICPInitTimeout) .RS 5 Maximum time allowed for the copy process to initialize, ie. open the source and destination files. .RE XRD_CPTPCTIMEOUT (-DICPTPCTimeout) .RS 5 Maximum time allowed for a third-party copy operation to finish. .RE XRD_TCPKEEPALIVE (-DITCPKeepAlive) .RS 5 Enable/Disable the TCP keep alive functionality .RE XRD_TCPKEEPALIVETIME (-DITCPKeepAliveTime) .RS 5 Time between last data packet sent and the first keepalive probe (Linux only) .RE XRD_TCPKEEPALIVEINTERVAL (-DITCPKeepAliveInterval) .RS 5 Interval between subsequent keepalive probes (Linux only) .RE XRD_TCPKEEPALIVEPROBES (-DITCPKeepProbes) .RS 5 Number of unacknowledged probes before considering the connection dead (Linux only) .RE XRD_METALINKPROCESSING .RS 5 Enable/Disable Metalink processing (enabled by default) .RE XRD_LOCALMETALINKFILE .RS 5 Enable/Disable local Metalink file processing (by convention the following URL schema has to be used: root://localfile//path/filename.meta4) The 'localfile' semantic is now deprecated, use file://localhost/path/filename.meta4 instead! .RE XRD_GLFNREDIRECTOR .RS 5 The redirector will be used as a last resort if the GLFN tag is specified in a Metalink file. .RE XRD_XCPBLOCKSIZE .RS 5 Maximu size of a data block assigned to a single source in case of an extreme copy transfer. .RE XRD_NODELAY .RS 5 Disables the Nagle algorithm if set to 1 (default), enables it if set to 0. .RE XRD_PREFERIPV4 .RS 5 If set the client tries first IPv4 address (turned off by default). .RE XRD_MAXMETALINKWAIT .RS 5 The maximum time in seconds a clinet can be stalled by the server if a Metalink redirector is available (defaults to 60s). .RE XRD_PRESERVELOCATETRIED .RS 5 If set to 1 XRootD client will preserve tried/triedrc cgi opaque info for kXR_locate request across redirects/retries, if set to 0 XRootD client will treat kXR_locate as any other passive request. .RE XRD_PRESERVEXATTRS .RS 5 If set to 1 (default) xrdcp will preserve file extended attribues, if set to 0 file extended attributes won't be preserved. .RE XRD_NOTLSOK .RS 5 If set to 1 and the server is to old to support TLS encryption, xrdcp will fallback to unencrypted transmission although roots/xroots protocol was used. By default set to 0. .RE XRD_TLSNODATA .RS 5 If set to 1, in case of roots/xroots protocol only the control stream will be encrypted, data streams will be left unencrypted. By default set to 0. .RE XRD_TLSMETALINK .RS 5 If set to 1 all URLs in metalink will be treated as roots/xroots. By default set to 0. .RE XRD_ZIPMTLNCKSUM .RS 5 If set to 1, use the checksum available in a metalink file even if a file is being extracted from a ZIP archive. By default set to 0; .RE XRD_CPTIMEOUT .RS 5 Timeout for a classical (not TPC) copy job. By default set to 0 (disabled); .RE XRD_CLCONFDIR .RS 5 User defined directory with config files (*.conf). .RE XRD_CLCONFFILE .RS 5 User defined config file. .RE XRD_CPRETRY .RS 5 Maximum number of times to retry failed copy-jobs (default: 0). .RE XRD_CPRETRYPOLICY .RS 5 Copy job retry policy, either force or retry (default: force). .RE XRD_CPUSEPGWRTRD .RS 5 Enable in-fly error correction of corrupted pages (default: 1). .RE .SH RETURN CODES .RE \fB50\fR : generic error (e.g. config, internal, data, OS, command line option) \fB51\fR : socket related error \fB52\fR : postmaster related error \fB53\fR : XRootD related error \fB54\fR : redirection error \fB55\fR : query response was negative (this is not an error) .SH NOTES Documentation for all components associated with \fBxrdcp\fR can be found at http://xrootd.org/docs.html .SH DIAGNOSTICS Errors yield an error message and a non-zero exit status. .SH LICENSE LGPL .SH SUPPORT LEVEL The \fBxrdcp\fR command is supported by the xrootd collaboration. Contact information can be found at: .ce http://xrootd.org/contact.html