Data Backup and Recovery

Use XCP to flat dump files into SINGLE DIRECTORY

Mohanz
599 Views

I Have a situation where I have to find all files under a specific directory structure (1-10 level deep), find all files and copy it over to a SINGLE level on destination, but when I run copy with match filters to find only files, it is still dumping all the directory structure

 

Example of what I ran:-

xcp copy -match "fnm('*<name>*') and type == f" <source>  <Destination>

 

below is what I get;

Stats : 1.91M scanned, 66 matched, 7,240 copied, 7,241 indexed, 3,254 giants
Speed : 90.1 GiB in (451 MiB/s), 88.4 GiB out (442 MiB/s)

 

though it found only 66 matching files, it also copied over about 7240 Dir structure along it 

ex:

/source/a/b/c/d/file1

/source/a/b/file2 
/source/a/file3

 

I want all of this to be copied over to just

/destination/file1 

/destination/file2

/destination/file3

0 REPLIES 0
Public