# Rake uploads:migrate\_to\_s3 runs forever

**URL:** <https://meta.discourse.org/t/rake-uploads-migrate-to-s3-runs-forever/147245>\
**Category:** Self-hosting\
**Tags:** s3\
**Created:** [April 8, 2020, 10:45am UTC](https://meta.discourse.org/t/rake-uploads-migrate-to-s3-runs-forever/147245 "2020-04-08T10:45:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pnoeric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pnoeric/32/177144_2.png) [@pnoeric](https://meta.discourse.org/u/pnoeric)\
**Post date:** [April 8, 2020, 10:45am UTC](https://meta.discourse.org/t/rake-uploads-migrate-to-s3-runs-forever/147245/1 "2020-04-08T10:45:11Z")

</div>

When I run that command, I get:

```plaintext
Migrating uploads to S3 for 'default'...
Uploading files to S3...
 - Listing local files
 => 23 files
 - Listing S3 files
. => 94 files
 - Syncing files to S3
.......................
Updating the URLs in the database...
Removing old optimized images...
Flagging all posts containing lightboxes for rebake...
4 posts were flagged for a rebake
4 posts still require rebaking and will be rebaked during regular job
Done!
Migrating uploads to S3 for 'default'...
Uploading files to S3...
 - Listing local files
 => 23 files
 - Listing S3 files
. => 94 files
 - Syncing files to S3
.......................
Updating the URLs in the database...
Removing old optimized images...
Flagging all posts containing lightboxes for rebake...
4 posts were flagged for a rebake
4 posts still require rebaking and will be rebaked during regular job
Done!
Migrating uploads to S3 for 'default'...
Uploading files to S3...
 - Listing local files
 => 23 files
 - Listing S3 files
. => 94 files
 - Syncing files to S3
.......................
Updating the URLs in the database...
Removing old optimized images...
Flagging all posts containing lightboxes for rebake...
4 posts were flagged for a rebake
4 posts still require rebaking and will be rebaked during regular job
Done!
Migrating uploads to S3 for 'default'...
Uploading files to S3...
 - Listing local files
 => 23 files
 - Listing S3 files
. => 94 files
 - Syncing files to S3
.......................

```

and it just keeps going.

Ultimately I hit ctrl-C and did `rake posts:rebake` which worked fine.

Then for kicks I tried the `rake uploads:migrate_to_s3` command again, which did exactly the same thing again as above (same output, same endless loop).

Not sure what’s going on, or if this is a problem or not, but wanted to report. Any thoughts?

---

_[View the full topic](https://meta.discourse.org/t/rake-uploads-migrate-to-s3-runs-forever/147245)._
