sync_media_s3 always uploads every file...?

21 views
Skip to first unread message

David Eyk

unread,
Apr 5, 2010, 5:53:05 PM4/5/10
to django-extensions
The sync_media_s3 command is a wonderful tool. However, it seems to
always upload everything every time it is run. Would there be any way
to make it smarter about only uploading files that are new or have
changed?

--David Eyk

Bas van Oostveen

unread,
Apr 8, 2010, 9:04:42 AM4/8/10
to django-e...@googlegroups.com

I don't have any experience with s3, but a simple solution could be
to keep a Manifest.s3 file around for every root-path uploaded to s3
containing path+mtime, so that the command can scan for changes.

regards

Rob Hudson

unread,
Apr 8, 2010, 11:47:33 AM4/8/10
to django-extensions
It does already attempt to do a timestamp check on both files and only
if the file is newer, upload to S3. If this is not working for some
reason, it's a new bug.

http://github.com/django-extensions/django-extensions/blob/master/django_extensions/management/commands/sync_media_s3.py#L208

-Rob

Reply all
Reply to author
Forward
0 new messages