1

Using the S3 CLI, I can sync a local directory with an S3 bucket using the following command:

aws s3 sync s3://mybucket/ ./local_dir/

This command is a complete sync. It uploads new files, updates changed files, and deletes removed files. I am trying to figure out how to do something equivalent using the OpenStack Object Storage CLI:

http://docs.openstack.org/cli-reference/content/swiftclient_commands.html

The upload command has a --changed option. But I need a complete sync that is also capable of deleting local files that were removed.

Does anyone know if I can do something equivalent to s3 sync?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • I know this is old but if you are looking to use Openstack Swift then you can enable S3 Emulator (Swift3 middleware) so you can use `s3cmd` tool just like your existing command. `s3cmd sync s3://mybucket/ ./local_dir/` – Brandon Clark Apr 26 '17 at 01:39

1 Answers1

0

The link you mentioned has this :

`

objects –

A list of file/directory names (strings) or SwiftUploadObject instances containing a source for the created object, an object name, and an options dict (can be None) to override the options for that individual upload operation`

I'm thinking, if you pass the directory and the --changed option it should work. I don't have a swift to test with. Can you try again?

Ravindra Mijar
  • 1,282
  • 2
  • 9
  • 17