Ignore:
Timestamp:
07/06/06 12:55:18 (13 years ago)
Author:
selatham
Message:

bug fix in copying to backup directories

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/oai_ingest.py

    r1076 r1121  
    148148# ingest the datacentres records into eXist db (backups of exist happen nightly). 
    149149commandline = "client.sh -c /db/dif/" + datacentre + " -u admin -P xxxxxx -p /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/" 
    150 print "Executing : " + commandline 
     150#print "Executing : " + commandline 
    151151status = os.system(commandline) 
    152152if status !=0: 
     
    160160if status !=0: 
    161161    sys.exit("Failed at creating backup directory %s" %this_backupdir) 
    162 commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/oai/difcopy/ | xargs -i cp /usr/local/WSClients/OAIBatch/data/" + datacentre +"/oai/difcopy/{\}" + this_backupdir 
     162 
     163commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/oai/difcopy/ | xargs -i cp /usr/local/WSClients/OAIBatch/data/" + datacentre +"/oai/difcopy/{\} " + this_backupdir 
    163164print "Executing : " + commandline 
    164165status = os.system(commandline) 
     
    172173if status !=0: 
    173174    sys.exit("Failed at creating backup directory %s" %this_backupdir) 
    174 commandline = "cp " + "/usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/* " + this_backupdir 
     175commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/ | xargs -i cp /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/{\} " + this_backupdir 
    175176print "Executing : " + commandline 
    176177status = os.system(commandline) 
     
    179180         
    180181#Clear out the original harvest records area 
    181 commandline = "rm -f " +  harvest_home +"/*" 
     182commandline = "ls -1 " + harvest_home + " | xargs -i rm -f {\}" 
    182183print "Executing : " + commandline 
    183184status = os.system(commandline) 
Note: See TracChangeset for help on using the changeset viewer.