diff --git a/move_to_rucio.py b/move_to_rucio.py index 27557b160ad3db5d013817db5052d470a9a17d8d..5de312164d0241da0aa64526a046b22b3db2f79a 100755 --- a/move_to_rucio.py +++ b/move_to_rucio.py @@ -29,13 +29,15 @@ with open("source_data_list.dat") as sdl: filepaths, filelist_data = data_parser(source_data) # step 2: compute directory hashes scope = 'lofar' +srm_root_host = "srm://srm.grid.sara.nl" +rucio_rse_rootdir = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/escape/disk/rucio/sara_dcache" rdt = protocol.RSEDeterministicTranslation() for frompath in filepaths: fname = os.path.basename(frompath) tosubpath = rdt.path(scope,fname) - print(frompath, tosubpath) - -# step 3: move data to directories + from_address = "/".join([srm_root_host, frompath]) + to_address = "/".join([rucio_rse_rootdir, tosubpath]) + print("srmmv {src} {tgt}".format(src=from_address, tgt=to_address)) # step 4: Add replicas for files using rucio.client.replicaclient the ReplicaClient class (add_replicas)