Ask Your Question
0

How to set up swift upload via a script called through cron

asked 2015-09-01 12:42:17 -0600

GunaSeelan Jothimani gravatar image

updated 2015-09-02 01:41:15 -0600

I am using "swift upload" to transfer files to container, the upload command works from command line or via script when executed from command line, however if the script is put in cron the transfer doesnt work. No error is seen.

Script logic
========

#!/bin/bash
/bin/echo "Starting Test1" >> /tmp/tmprun
/usr/bin/swift "upload" "<Destination>" "<SourceFile>"

Please suggest how to schedule a swift upload via script?

Regards, GunaSeelan J

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-09-02 01:44:56 -0600

updated 2015-09-02 01:47:52 -0600

Hello,

If your credential file is not sourced, you will need to source the credential file from the script.

source <CREDENTIAL_FILE>

Regards

edit flag offensive delete link more

Comments

Thanks! sourcing the credential file solved the issue :-)

GunaSeelan Jothimani gravatar imageGunaSeelan Jothimani ( 2015-09-02 08:46:20 -0600 )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: 2015-09-01 12:42:17 -0600

Seen: 248 times

Last updated: Sep 02 '15