XRootD
Loading...
Searching...
No Matches
XrdOssArcConfig.hh
Go to the documentation of this file.
1#ifndef __XRDOSSARCCONFIG_HH__
2#define __XRDOSSARCCONFIG_HH__
3/******************************************************************************/
4/* */
5/* X r d O s s A r c C o n f i g . h h */
6/* */
7/* (c) 2023 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* Produced by Andrew Hanushevsky for Stanford University under contract */
9/* DE-AC02-76-SFO0515 with the Deprtment of Energy */
10/* */
11/* This file is part of the XRootD software suite. */
12/* */
13/* XRootD is free software: you can redistribute it and/or modify it under */
14/* the terms of the GNU Lesser General Public License as published by the */
15/* Free Software Foundation, either version 3 of the License, or (at your */
16/* option) any later version. */
17/* */
18/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21/* License for more details. */
22/* */
23/* You should have received a copy of the GNU Lesser General Public License */
24/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26/* */
27/* The copyright holder's institutional names and contributor's names may not */
28/* be used to endorse or promote products derived from this software without */
29/* specific prior written permission of the institution or contributor. */
30/******************************************************************************/
31
32class XrdOucEnv;
33class XrdOucProg;
36
38{
39public:
40
41bool BuildPath(const char* what, const char* baseP,
42 const char* addP, char*& destP, int mode=0);
43
44bool Configure(const char* cfn, const char* parms, XrdOucEnv* envP);
45
46int GenTapePath(const char* dsn, char* buff, int bSZ, bool addafn=false);
47
49 ~XrdOssArcConfig() {} // Never gets deleted
50
51// Program section (i.e. the various scripts to launch
52//
53XrdOucProg* BkpUtilProg; // Various Rucio involved functions
54char* BkpUtilPath; // The actual path to the program
55const char* BkpUtilName; // Last component for debugging
56const char* BkpUtilEOL; // Character sequence to indicate EOL
57
58XrdOucProg* PrepArcProg; // Create an archive
59char* PrepArcPath; // The actual path to the executable
60const char* PrepArcName; // Last component for debugging
61
62XrdOucProg* PostArcProg; // Create an archive
63char* PostArcPath; // The actual path to the executable
64const char* PostArcName; // Last component for debugging
65
66XrdOucProg* ArchiverProg; // Create an archive
67char* ArchiverPath; // The actual path to the executable
68const char* ArchiverName; // Last component for debugging
69char* ArchiverSave; // The command to use to save archives for backup
70
71XrdOucProg* MssComProg; // Communicate with the MSS
72char* MssComPath; // Path to prog script
73const char* MssComName; // Last component for debugging
74char* MssComCmd; // Actual command to be invoked
75char* MssComRoot; // Root of the MSS Tape File System
76
77// Path section
78//
79char* arcvPathLFN; // LFN of archive path, default "/archive/"
80int arcvPathLEN; // Length of the above
81int bkupPathLEN; // Length of the below
82char* bkupPathLFN; // LFN of backup path, default "/backup/"
83char* dsetPathLFN; // LFN of dataset path, default "/dataset/"
84char* dsetRepoPFN; // Path to directory where dataset backups are staged
85char* admnPath; // The admin path
86char* srcData; // Root path to where srcrse data is mounted
87char* stagePath; // Path to directory where zip members are extracted
88char* stopPath; // Path where the stop file should be written
89char* tapePath; // The full path of the tape disk buffer
90int tapePathLEN; // Length of the above
91char* utilsPath; // Default path to utils
92
93// Miscellaneous
94//
95XrdOssArcStopMon* stopMon; // Pointer to the parent stop monitor
96
97const char* metaBKP; // Metadata variable name of backup status
98const char* metaIDX; // Metadata variable name of ordinal index
99char* doneBKP; // Metadata value indicating a backup completed
100char* needBKP; // Metadata value indicating a backup is needed
101char* dstRSE; // The name of the dest rse (our name)
102char* srcRSE; // The name of the source rse
103char* manCKS; // Checksum algorithm to add to manifest
104long long bkpMinF; // Percentage or bytes that must be always available
105int bkpMax; // Maximum number of parallel backups
106int bkpPoll; // Polling interval to find new items to backup
107int bkpFSt; // Backup fs scan interval in seconds
108int maxStage; // Maximum number of parallel stages
109int wtpStage; // Staging Wait/Poll interval
110int r_maxItems; // rucio maximum response lines (query limit)
111char* arFName; // Full archive filename (e.g. archive.zip)
112char* arfSfx; // Archive file suffix
113int arfSfxLen; // Length of the above
114int stopChk; // Stat interval for STOP file
115long long arcSZ_Want; // Preferred size of archive
116long long arcSZ_MinV; // Minimum size archive can have
117long long arcSZ_MaxV; // Maximum size archive can have
118bool arcSZ_Skip; // When true skip archiving if size can't be met
119bool bkpLocal; // T->Use fuse mount for backup, else do remote copy.
120
121private:
122void ConfigPath(char** pDest, const char* pRoot);
123bool ConfigProc(const char* drctv);
124bool ConfigXeq(const char* cfName, const char* parms, XrdOucEnv* envP);
125int GenLocalPath(const char* dsn, char* buff, int bSZ);
126bool MissArg(const char* what);
127bool Usable(const char* path, const char* what, bool useOss=true);
128bool xqGrab(const char* what, char*& theDest, const char* theLine);
129bool xqArcsz();
130bool xqBkup();
131bool xqBkupPS(char* tval);
132bool xqBkupScope();
133bool xqManf();
134bool xqPaths();
135bool xqRse();
136bool xqRucio();
137bool xqStage();
138bool xqTrace();
139bool xqUtils();
140
141XrdOucGatherConf* Conf;
142};
143#endif
const char * PostArcName
XrdOucProg * MssComProg
const char * metaBKP
const char * metaIDX
const char * BkpUtilEOL
bool BuildPath(const char *what, const char *baseP, const char *addP, char *&destP, int mode=0)
XrdOssArcStopMon * stopMon
XrdOucProg * ArchiverProg
int GenTapePath(const char *dsn, char *buff, int bSZ, bool addafn=false)
const char * ArchiverName
const char * MssComName
const char * PrepArcName
bool Configure(const char *cfn, const char *parms, XrdOucEnv *envP)
const char * BkpUtilName
XrdOucProg * PrepArcProg
XrdOucProg * PostArcProg
XrdOucProg * BkpUtilProg