-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: --delete-local option on "archive upload" #9
Comments
Sounds like a reasonable need. I've been careful to make sure that glacier-cli only returns success only when the upload is successful, and it would be a bug if there's any case where it doesn't do this. Given that you are calling glacier-cli from a script anyway, is there any reason why you can't do something like this?
The If this works for you, I'd prefer to keep glacier-cli within the Unix philosophy of doing one thing well, and leaving it to the caller to put it together with other tools as necessary. But if this is awkward for some reason that I'm missing, or if there is some other reason for which we need it, then I'll be happy to add something like a |
Incidentally, I'll be adding automatic upload resume functionality soon. You may find this useful. Just waiting on a pull request in boto. |
Yep I can use a script &&. I can't think of a good reason not to, especially now I know the return codes are properly returned by glacier-cli. Many thanks for the tip. If I run into a road block I will re-request the feature. |
OK, but one warning. Although the intent is to make sure that the exit status is only zero if the upload was successful, there may be bugs anywhere in the stack. Eg. glacier-cli, boto, python's httplib, etc. Please remember that there's no warranty, and test your particular use cases! |
It would be great to have an option on the "upload" command to delete the local copy of the file after a successful upload. Maybe a "--delete-local"????
I am encrypting my files before uploading to Glacier (like everybody). Therefore, after the file is uploaded I don't need the local file anymore. The deletion of the file also indicates that the file has been uploaded. This means I can interrupt an upload script and restart without duplicating uploads.
I need to be able to interrupt my upload script sometimes because I need my uplink bandwidth for other purposes.
Further info: I am uploading my 80GB of photos as individual encrypted files via a slow 2Mbps link. I am using a basic 'find' to recurse down my directory tree, with an -exec to encrypt, upload, delete encrypted file. Interrupting my simple 'find' and restarting leads to duplicated files. Adding the above option, would allow me to create an encrypted cache of my files, and upload when convenient. If it's deleted then it was successfully uploaded.
The text was updated successfully, but these errors were encountered: