xrdcopy(1)
π xrdcopy(1) π
okay bestie, so this is xrdcopy(1) from the General Commands Manual section, and it is literally the glow-up era of file copying. buckle up π
β¨ NAME β¨
xrdcp β copy files π¦
like. just. copy. files. iconic behavior honestly.
πΈ SYNOPSIS πΈ
xrdcp [options] source destination
options: [--cksum args] [--debug lvl]
[--coerce] [--force] [--help] [--license]
[--nopbar] [--posc] [--proxy ipaddr:port]
[--recursive] [--retry time] [--server]
[--silent] [--sources num] [--streams num]
[--tpc [delegate] [push] first|only]
[--tpc-token-file file] [--verbose]
[--version] [--xrate rate] [--zip file]
[--dynamic-src] [--infiles fn]
[--parallel n] [--xattr]
[--notlsok] [--tlsnodata] [--tlsmetalink]
[--zip-mtln-cksum] [--rm-bad-cksum] [--continue]
[--xrate-threshold] [--retry-policy]
[--header name: value]
legacy options: [-adler] [-DSparm string] [-DIparm number]
[-md5] [-np] [-ODcgi] [-OScgi] [-x]
π« DESCRIPTION π«
so, the xrdcp 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. and plot twist β the data source may also reside on multiple servers. multitasking queen π
π OPTIONS π
-C | --cksum type[:value|print|source]β grabs the checksum of type (likeadler32,crc32,md5orzcrc32) from the source, computes the checksum at the destination, and verifies they're the same. if you pickautoas the checksum type,xrdcpwill 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 value is specified, it's used as the source checksum. and whenprintis specified, the checksum at the destination gets printed but is not verified. trust but verify? not here bestie π-d | --debug lvlβ debug level:1(low),2(medium),3(high)-F | --coerceβ ignores locking semantics on the destination file. > β οΈ this option may lead to file corruption if not properly used. not me warning you, that's literally in the docs.-f | --forceβ re-creates a file if it's already present. it said "refresh" and meant it β¨-H | --header name: valueβ adds the given header to the requests sent to an http or https endpoint. may be repeated to add more than one header. requires that the source or the destination is an http or https URL. theConnection,Content-Length,Expect,Host,Keep-Alive,Proxy-Authenticate,Proxy-Authorization,Proxy-Connection,TE,Trailer,Transfer-EncodingandUpgradeheaders are reserved and cannot be overridden. each of these names prepended withTransferHeaderis reserved as well.
in a third party copy (--tpc), the headers go to the server the client connects to: the destination server in pull mode, or the source server in push mode. to send a header to the other server β the one the client does not connect to β prepend TransferHeader to the header name. for example, in pull mode:
-H "X-Request-Id: <destination-id>"
-H "TransferHeaderX-Request-Id: <source-id>"
the destination server gets the X-Request-Id header, and sends the value of TransferHeaderX-Request-Id as the X-Request-Id header of its request to the source server. lowkey elegant i fear π§
if the option is not specified, the XRD_HTTPHEADERS environment variable is used instead. it holds the headers as a newline separated list of "name: value" entries.
-h | --helpβ displays usage information.--licenseβ displays license terms and conditions. the legal lore π-N | --nopbarβ does not display the progress bar. for when the bar is too much main character energy.-P | --poscβ requests POSC (persist-on-successful-close) processing to create a new file. files are automatically deleted should they not be successfully closed. all or nothing, periodt π-D | --proxy proxyaddr:proxyportβ [NOT YET IMPLEMENTED]
use proxyaddr:proxyport as a SOCKS4 proxy. only numerical addresses are supported.
-r | --recursiveβ recursively copy all files starting at the given source directory. go off, do the whole tree π³--retryβ retry failed copy-jobs. it gets back up again π«Ά--serverβ runs as if in a server environment. used only for server-side third party copy support.-s | --silentβ neither produces summary information nor displays the progress bar. zero noise, all vibes.-y | --sources numβ uses up to num sources to copy the file.-S | --streams numβ use num parallel data streams to do the transfer (the main stream is in this case not used to carry out the transfer). the maximum value is15. the default is0(i.e., use only the control stream).--tpc [delegate] [push] first|onlyβ 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. the argumentfirsttries tpc and if it fails, does a normal copy; whileonlyfails the copy unless tpc succeeds. whendelegateis 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. whenpushis specified, the copy is driven by the source server which pushes the data to the destination. by default, the copy is driven by the destination server which pulls the data from the source. push copies only apply to third-party copies performed over HTTP(S). server-to-server, no cap π--tpc-token-file fileβ specifies the file holding the bearer tokens used to authenticate the third-party copy. the first line of file contains the token presented to the source and the second line the token presented to the destination. alternatively, file may hold a JSON object whose'src'property is the token presented to the source and whose'dst'property is the token presented to the destination, as in'{ "src": "<token>", "dst": "<token>" }'. in both formats a token may be left out, by an empty line or by an omitted property, in which case the corresponding side is given no token, so a pull or a push may well be authenticated with a single token. each token is sent as an'Authorization: Bearer'header, so the option only applies to third-party copies performed over HTTP(S). if the option is not specified, the file named by theBEARER_TOKEN_FILEenvironment variable is used instead. the copy fails if file cannot be opened or if it holds neither a source nor a destination token.-v | --verboseβ displays summary output. tell me everything π₯-V | -versionβ displays version information and immediately exits. hi and bye π-z | --zip fileβ copy given file from a ZIP archive (same asxrdcl.unzipopaque info).-X | --xrate rateβ limits the copy speed to the specified rate. the rate may be qualified with the letterk,m, orgto indicate kilo, mega, or giga bytes, respectively. the option only applies when the source or destination is local. speed limit but make it fashion.-X | --xrate-threshold rateβ 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.-Z | --dynamic-srcβ file size may change during the copy. chaotic, we love that for it π-I | --infiles fnβ specifies the file that contains a list of input files.--parallel nβ number of copy jobs to be run simultaneously. multitasking icon.--xattrβ preserve extended attributes.--notlsokβ if server is too old to support TLS encryption fallback to unencrypted communication.--tlsnodataβ in case ofroots/xrootsprotocol, encrypt only the control stream and leave the data streams unencrypted.--tlsmetalinkβ treat all URLs in metalink asroots/xroots.--zip-mtln-cksumβ use the checksum available in a metalink file even if a file is being extracted from a ZIP archive.--rm-bad-cksumβ remove the target file if checksum verification failed (enables also POSC semantics). failing the vibe check = deleted π--continueβ continue copying a file from the point where the previous copy was interrupted. we don't restart, we resume β¨
π¦ LEGACY OPTIONS π¦
legacy options are provided for backward compatibility. these are now deprecated and should be avoided. i'm not saying anything, i'm just saying π
-adlerβ equivalent to"--cksum adler32:source".-DIpname numbervalβ set the internal parameter pname with the numeric value numberval.-DSpname stringvalβ set the internal parameter pname with the string value stringval.-md5β equivalent to"--cksum md5:source".-npβ equivalent to"--nopbar".-ODcgiβ add cgi information cgi to any destination xrootd URL. you should specify the opaque information directly on the destination URL.-OScgiβ add cgi information cgi to any source xrootd URL.-xβ equivalent to"--sources 12".
π OPERANDS π
- source β a dash (i.e.
-) indicating stanard in, a local file, a local directory name suffixed by/, or an xrootd URL in the form of
xroot://[user@]host[:port]/absolutepath
the absolutepath can be a directory.
- destination β a dash (i.e.
-) indicating stanard out, a local file, a local directory name suffixed by/, or an xrootd URL in the form
xroot://[user@]host[:port]/absolutepath
the absolutepath can be a directory.
bestie there's more where that came from, hold on ππ
πΏ ENVIRONMENT πΏ
okay bestie, this is the part where the client reads your β¨vibesβ¨ from the environment. All these variables apply to xrdfs and every other app that's running the libXrdCl library, unless the description specifically says otherwise. And see the stuff in the brackets? That's the name of the matching xrdcp commandline parameter. iykyk π«Ά
XRD_LOGLEVELβ this one controls how much diagnostic tea gets spilled. Valid values are:Dump,Debug,Info,Warning, andError.XRD_LOGFILEβ set this and all those diagnostics get written to the file you name instead of going tostderr. no messy terminal, we're organized πXRD_LOGMASKβ decides which diagnostic topics are printed at all, at every level. It's a"|"separated list of topics. The first element can be"All", in which case every topic is enabled and the elements after it can turn some back off β or"None", in which case everything is disabled and the following flags can turn things back on. If a topic name is prefixed with"^", that means the topic should be disabled. If there's no prefix, that means the topic should be enabled.
You can also handle the log mask per diagnostic level, separately, by setting one or more of these bad boys: XRD_LOGMASK_ERROR, XRD_LOGMASK_WARNING, XRD_LOGMASK_INFO, XRD_LOGMASK_DEBUG, and XRD_LOGMASK_DUMP. The default for each level is "All", except for the Dump level, where the default is "All|^PollerMsg". Which means: at Dump level, every topic except "PollerMsg" is enabled. slay β¨
Available topics: AppMsg, UtilityMsg, FileMsg, PollerMsg, PostMasterMsg, XRootDTransportMsg, TaskMgrMsg, XRootDMsg, FileSystemMsg, AsyncSockMsg, TlsMsg
XRD_TLSDBGLVLβ sets the debug level for the TLS component. Valid values are:OFF,CTX,SOK,SIO,ALLandOUT. The default value isOFF.XRD_PARALLELEVTLOOPβ the number of event loops aka the number of threads handling requests. Default number is10. ten threads living their truth π§XRD_READRECOVERYβ turns read recovery on or off (on by default, bestie).XRD_WRITERECOVERYβ turns write recovery on or off (on by default).XRD_OPENRECOVERYβ turns open recovery on or off for mutable (truncate or create) opens (on by default).XRD_CONNECTIONWINDOW(-DIConnectionWindow) β a time window for establishing the connection. If the connection isn't established inside that window, it's officially a connection failure. And if a connection failure happens earlier than that, another connection attempt only gets made at the beginning of the next window. patience is a virtue ig πXRD_CONNECTIONRETRY(-DIConnectionRetry) β how many connection attempts (aka how many available connection windows) get made before the failure is declared permanent. fr fr, after that it's over.XRD_REQUESTTIMEOUT(-DIRequestTimeout) β the default time after which an error is declared when it was impossible to get a response to a request.XRD_STREAMTIMEOUT(-DIStreamTimeout) β the default time after which a connection error is declared (and a recovery gets attempted) if there are unfulfilled requests and there's no socket activity or a registered wait timeout.XRD_SUBSTREAMSPERCHANNEL(-DISubStreamsPerChannel) β number of streams per session.XRD_TIMEOUTRESOLUTION(-DITimeoutResolution) β the resolution for timeout events. i.e. timeout events only get processed everyXRD_TIMEOUTRESOLUTIONseconds.XRD_STREAMERRORWINDOW(-DIStreamErrorWindow) β the time after which the permanent failure flags get cleared out and a new connection may be attempted if needed. fresh start energy πΈXRD_RUNFORKHANDLER(-DIRunForkHandler) β decides whether the fork handlers should be enabled, which is what makes the API fork safe.XRD_REDIRECTLIMIT(-DIRedirectLimit) β the maximum number of allowed redirections.XRD_NOTAUTHORIZEDRETRYLIMIT(-dNotAuthorizedRetryLimit) β the maximum number of allowed retries at a meta-manager for a not-authorized error.XRD_POLLERPREFERENCE(-DSPollerPreference) β a comma separated list of poller implementations, in order of preference. The default is:built-in.XRD_CLIENTMONITOR(-DSClientMonitor) β path to the client monitor library.XRD_CLIENTMONITORPARAM(-DSClientMonitorParam) β extra optional parameters that get passed to the monitoring object on initialization.XRD_WORKERTHREADS(-DIWorkerThreads) β number of threads processing user callbacks.XRD_CPPARALLELCHUNKS(-DICPParallelChunks) β the maximum number of asynchronous requests being processed by thexrdcpcommand per connected channel substream (it gets adjusted in real-time, she's adaptive π ).XRD_CPCHUNKSIZE(-DICPChunkSize) β the size of a single data chunk handled byxrdcp.XRD_NETWORKSTACK(-DSNetworkStack) β the network stack the client should use to connect to the server. Possible values are:IPAutoβ automatically detect which IP stack to useIPAllβ use IPv6 stack (AF_INET6sockets) and both IPv6 and IPv4 (mapped to IPv6) addressesIPv6β use only IPv6 stack and addressesIPv4β use only IPv4 stack (AF_INETsockets) and addressesIPv4Mapped6β use IPv6 stack and mapped IPv4 addresses
XRD_DATASERVERTTL(-DIDataServerTTL) β the time period after which an idle connection to a data server should be closed.XRD_LOADBALANCERTTL(-DILoadBalancerTTL) β the time period after which an idle connection to a manager or a load balancer should be closed.XRD_APPNAME(-DSAppName) β override the application name that gets reported to the server. main character rebrand β¨XRD_PLUGINCONFDIRβ a custom location containing client plug-in config files.XRD_PLUGINβ a default client plug-in to be used.XRD_CPINITTIMEOUT(-DICPInitTimeout) β the maximum time allowed for the copy process to initialize, i.e. open the source and destination files.XRD_CPTPCTIMEOUT(-DICPTPCTimeout) β the maximum time allowed for a third-party copy operation to finish.XRD_TCPKEEPALIVE(-DITCPKeepAlive) β enable/disable the TCP keep alive functionalityXRD_TCPKEEPALIVETIME(-DITCPKeepAliveTime) β the time between the last data packet sent and the first keepalive probe (Linux only)XRD_TCPKEEPALIVEINTERVAL(-DITCPKeepAliveInterval) β the interval between subsequent keepalive probes (Linux only)XRD_TCPKEEPALIVEPROBES(-DITCPKeepProbes) β number of unacknowledged probes before the connection is considered dead (Linux only)XRD_METALINKPROCESSINGβ enable/disable Metalink processing (enabled by default)XRD_LOCALMETALINKFILEβ enable/disable local Metalink file processing (by convention the following URL schema has to be used:root://localfile//path/filename.meta4).
β οΈ bestie the'localfile'semantic is now deprecated, usefile://localhost/path/filename.meta4instead! we do not romanticize the old ways π
XRD_GLFNREDIRECTORβ the redirector will be used as a last resort if theGLFNtag is specified in a Metalink file.XRD_XCPBLOCKSIZEβ maximum size of a data block assigned to a single source in the case of an extreme copy transfer.XRD_NODELAYβ disables the Nagle algorithm if set to1(default), enables it if set to0.XRD_PREFERIPV4β if set, the client tries the IPv4 address first (turned off by default).XRD_MAXMETALINKWAITβ the maximum time in seconds a client can be stalled by the server if a Metalink redirector is available (defaults to60s).XRD_PRESERVELOCATETRIEDβ if set to1, the XRootD client will preserve tried/triedrc cgi opaque info forkXR_locaterequests across redirects/retries; if set to0, the XRootD client will treatkXR_locateas any other passive request.XRD_PRESERVEXATTRSβ if set to1(default)xrdcpwill preserve file extended attributes; if set to0, file extended attributes won't be preserved.XRD_NOTLSOKβ if set to1and the server is too old to support TLS encryption,xrdcpwill fallback to unencrypted transmission even though the roots/xroots protocol was used. By default set to0.XRD_TLSNODATAβ if set to1, in the case of the roots/xroots protocol only the control stream will be encrypted, and the data streams will be left unencrypted. By default set to0.XRD_TLSMETALINKβ if set to1, all URLs in the metalink will be treated as roots/xroots. By default set to0.XRD_ZIPMTLNCKSUMβ if set to1, use the checksum available in a metalink file even if a file is being extracted from a ZIP archive. By default set to0;XRD_CPTIMEOUTβ timeout for a classical (not TPC) copy job. By default set to0(disabled);XRD_CLCONFDIRβ user defined directory with config files (*.conf).XRD_CLCONFFILEβ user defined config file.XRD_CPRETRYβ maximum number of times to retry failed copy-jobs (default:0).XRD_CPRETRYPOLICYβ copy job retry policy, eitherforceorretry(default:force).XRD_CPUSEPGWRTRDβ enable in-fly error correction of corrupted pages (default:1).
π¦ RETURN CODES π¦
when she exits, she exits with intention. here's the receipts:
50: generic error (e.g. config, internal, data, OS, command line option)51: socket related error52: postmaster related error53: XRootD related error54: redirection error55: query response was negative (this is not an error)
π«Ά ok so 55 lowkey looks scary but it is literally not an error. read the parentheses bestie.
π NOTES π
Documentation for all components associated with xrdcp can be found at:
https://xrootd.org/docs.html
π DIAGNOSTICS π
Errors yield an error message and a non-zero exit status. periodt. π
π LICENSE π
LGPL
π SUPPORT LEVEL π
The xrdcp command is supported by the xrootd collaboration. Contact information can be found at:
https://xrootd.org/contact.html
and that's a wrap on the whole page bestie!! π this was v6.2.0 of xrdcopy(1), so go forth, copy ur files, and remember: the vibe is immaculate, the flags are sacred, the facts did not change. π¦β¨π
π¦ where this page comes from
- epel 10: xrootd-client 1:6.2.0-2.el10_3 Β· LGPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND curl AND MIT AND Zlib AND Apache-2.0 AND MPL-2.0
- fedora 44: xrootd-client 1:6.2.0-2.fc44 Β· LGPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND curl AND MIT AND Zlib AND Apache-2.0 AND MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms