lcg_rep(3) - Linux man page
Name
lcg_rep - copy a file from one Storage Element to another StorageElement and registers it in the LRC or the LFC
Synopsis
int lcg_rep (char *src_file, char *dest_file, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose);
int lcg_rept (char *src_file, char *dest_file, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose, int timeout);
int lcg_repx (char *src_file, char *dest_file, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose, char *errbuf, int errbufsz);
int lcg_repxt (char *src_file, char *dest_file, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose, int timeout, char *errbuf, int errbufsz);
int lcg_rep2 (char *src_file, char *dest_file, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose, int timeout, char *src_spacetokendesc, char *dest_spacetokendesc, char *errbuf, int errbufsz);
int lcg_rep3 (char *src_file, char *dest_file, enum se_typedefaulttype, enum se_typesrctype, enum se_typedsttype, int nobdii, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose, int timeout, char *src_spacetokendesc, char *dest_spacetokendesc, char **actual_surl, char *errbuf, int errbufsz);
int lcg_rep4 (char *src_file, char *dest_file, enum se_typedefaulttype, enum se_typesrctype, enum se_typedsttype, int nobdii, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose, int timeout, char *src_spacetokendesc, char *dest_spacetokendesc, char **actual_surl, enum gfal_cksm_type cksmtype, char *errbuf, int errbufsz);
int lcg_rep5 (char *src_file, char *dest_file, enum se_typedefaulttype, enum se_typesrctype, enum se_typedsttype, int nobdii, char *vo, char *relative_path, int nbstreams, char *conf_file, int insecure, int verbose, int timeout, char *src_spacetokendesc, char *dest_spacetokendesc, char **actual_surl, enum gfal_cksm_type cksmtype, char** src_protocols, char** dst_protocols, char *errbuf, int errbufsz);
Description
lcg_rep copies a file from one Storage Element to another Storage Element and registers it in the LRC or the LFC.- src_file
- specifies the source file name: the protocol can be LFN, GUID or SURL. An SURL scheme can be sfn: for a classical SE or srm:.
- dest_file
- specifies the destination. It can be the Storage Element fully qualified hostname or an SURL. In the latter case, the scheme can be sfn: for a classical SE or srm:. If only the fully qualified hostname is given, a filename is generated in the same format as with the Replica Manager.
- relative_path
- specifies the path relative to the SARoot for the given VO.
- nbstreams
- specifies the number of parallel streams (default 1).
- defaulttype
- specifies the default SE type you want to use. Possible values are TYPE_NONE, TYPE_SE, TYPE_SRM, TYPE_SRMv2, for respectively no default type, classic SE, SRMv1, and SRMv2. But if according to the BDII the default type is not available for this SE, it will use another type.
- srctype
- specifies the SE type you want to use for the source file. Possible values are TYPE_NONE, TYPE_SE, TYPE_SRM, TYPE_SRMv2, for respectively no type, classic SE, SRMv1, and SRMv2. But if according to the BDII the default type is not available for this SE, it will fail.
- dsttype
- specifies the SE type you want to use for the destination file. Possible values are TYPE_NONE, TYPE_SE, TYPE_SRM, TYPE_SRMv2, for respectively no type, classic SE, SRMv1, and SRMv2. But if according to the BDII the default type is not available for this SE, it will fail.
- nobdii
- If set to a non-zero value, it means that you don't want to make BDII calls to get SE type. So, you must provide the type of the SE for srm: arguments, and full endpoint in SURLs. For SE type, defaulttype can be used (it will be used for both source and destination).
- timeout
- specifies the value of timeout (default 0).
- verbose
- Verbose level. Here are the possible levels:
- Only critical errors are displayed on stderr or put into errbuf if not null.
- Warnings are displayed on stderr as well as critical errors.
- Debug information is displayed as well as warnings and critical errors.
- vo
- specifies the Virtual Organization the user belongs to. If it is not specified, the environment variable LCG_GFAL_VO will be used.
- conf_file
- This argument is currently ignored.
- insecure
- This argument is currently ignored. The access to the Replica Catalog or the LFC is done according to the endpoints published in MDS while the copy is always done in secure mode.
- cksmtype
- is the checksum type (algorithm) to use. Possible values are:
- GFAL_CKSM_NONE
- No checksum verification
- GFAL_CKSM_CRC32
- CRC32 algorithm will be used
- GFAL_CKSM_ADLER32
- Adler32 algorithm will be used
- GFAL_CKSM_MD5
- MD5 algorithm will be used
- GFAL_CKSM_SHA1
- errbuf
- specifies a buffer of size errbufsz to receive detailed error messages. If this pointer is NULL, the message goes to stderr. The pointer should not be NULL if the application is a daemon or is multi-threaded.
- src_spacetokendesc
- specifies the space token to use with src_file. Can be NULL.
- dest_spacetokendesc
- specifies the space token to use with dest_file. Can be NULL.
- actual_surl
- is a pointer to a char* variable. If not set to NULL, the actual SURL of the new replica will be stored in this variable.
- src_protocols
- The ordered list of source transfer protocols to help TURL construction. It must be a NULL-terminated string array. If the parameter is NULL, then the 1-element list containing "gsiftp" is used. If a SE does not support any of the listed protocols, errno will be set to EOPNOTSUPP.
- dst_protocols
- The ordered list of destination transfer protocols to help TURL construction. It should be a NULL-terminated string array. If the parameter is NULL, then the 1-element list containing "gsiftp" is used. If a SE does not support any of the listed protocols, errno will be set to EOPNOTSUPP.
Note
The environment variable LCG_GFAL_INFOSYS must point to the BDII, unless nobdii is set to a non-zero value. To use the RLS as catalog instead of the LFC, the environment variable LCG_CATALOG_TYPE must explicitely be set to "edg". By default, it is set to "lfc".Return Value
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, errno is set appropriately.Errors
- ENOENT
- The named file does not exist.
- EACCES
- Permission denied.
- EFAULT
- src_file, dest_file or vo is an invalid pointer.
- EINVAL
- src_file or dest_file has an invalid syntax.
- ECOMM
- Communication error.
- ENAMETOOLONG
- vo is too long.
- EPROTONOSUPPORT
- Access method not supported.
- EOPNOTSUPP
- An operation is not supported. They may be: source or destination protocol list is not supported.
Files
/opt/lcg/include/lcg_util.h- /opt/lcg/lib/liblcg_util.so
See Also
lcg_aa(3), lcg_cp(3), lcg_cr(3), lcg_del(3), lcg_gt(3), lcg_la(3), lcg_lg(3), lcg_lr(3), lcg_ra(3), lcg_rep(3), lcg_rf(3), lcg_sd(3), lcg_stmd(3), lcg_uf(3)Referenced By
lcg_get_checksum(3), lcg_get_checksum_python(3), lcg_set_transfer_callback(3)