Ask Your Question
0

Is there any scripts available to automate swift uploading?

asked 2013-08-07 22:25:03 -0500

ebyenjoys gravatar image

Hello, I want to know whether i could automate swift uploading,for example,i wish i could upload the data to swift if a new data is available in a particular directory in my raw server.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-08-08 00:28:43 -0500

clayg gravatar image

the standard openstack swift command line client [1] upload command has a --changed option that might suit your needs:

  -c, --changed         Will only upload files that have changed since the
                        last upload

For comparison you might also consider trying swiftly [2] - who's put command has a --different option that might also fit your needs:

  -d, --different       For PUTs with an --input option, first performs a HEAD
                        on the object and compares the X-Object-Meta-Mtime
                        header with the modified time of the PATH obtained
                        from the --input option and then PUTs the object only
                        if the local time is different. It will also check the
                        local and remote sizes and PUT if they differ.
                        ETag/MD5sum checking are not done (an option may be
                        provided in the future) since this is usually much
                        more disk intensive. When the --input PATH is a
                        directory, this offers an easy way to upload only the
                        differing files since the last upload (at the expense
                        of HEAD requests). NOTE THAT THIS CAN UPLOAD OLDER
                        FILES OVER NEWER ONES! DIFFERENT does not mean NEWER.
  1. https://github.com/openstack/python-swiftclient
  2. https://github.com/gholt/swiftly
edit flag offensive delete link more

Comments

Great..!!!! It worked out, Thanks a ton.

ebyenjoys gravatar imageebyenjoys ( 2014-09-06 14:14:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-08-07 22:25:03 -0500

Seen: 485 times

Last updated: Aug 08 '13