I own Object Storage containers at OVH. I found how to copy a file from one container to another:
swift copy -d /"Destination container" "Initial container" "File"
It works, but I want to copy hundreds of files. Do you know how to copy a lot of files that are in a folder ?
Thank you
The OpenStack Swift API doesn't have methods to copy multiple objects. The
PUT,GETandCOPYmethods all operate on single objects.So you have to loop over a listing of the source container, and copy each file one at a time. You can do this using a shell script and the
swiftcommand, or using one of the Swift API libraries and some custom code (e.g. in Python).Alternatively you could use
rclone(link) or potentiallycyberduck(link). These tools apparently don't use theCOPYmethod so the copy will entail extra transfer steps and may take longer overall than if you wrote a script to do the job.