The OpenStack Swift API doesn't have methods to copy multiple objects. The PUT
, GET
and COPY
methods 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 swift
command, or using one of the Swift API libraries and some custom code (e.g. in Python).
Alternatively you could use rclone
(link) or potentially cyberduck
(link). These tools apparently don't use the COPY
method so the copy will entail extra transfer steps and may take longer overall than if you wrote a script to do the job.