Skip to content
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

Parse migration to heroku/aws regarding the images #420

Closed
kumargagan4 opened this issue Feb 15, 2016 · 11 comments
Closed

Parse migration to heroku/aws regarding the images #420

kumargagan4 opened this issue Feb 15, 2016 · 11 comments

Comments

@kumargagan4
Copy link

I have successfully migrated my parse db to aws but the urls of image files still like 'http://files.parsetfss.com/77447afb-f681-4b55-afad-6bceeb2e155a/tfss-79297c86-bd48-4d7f-87ab-c43e02d1a8f3-photo.png'

it means files are still on parse s3 cloud or something their own storage so what will happen to those files after parse shutdown.
what is the way to migrate the images to new database/storage on my own AWS. I am worried because I have apprx 14.5 k images on parse.

Please provide you valuable guidance on this.

@natario1
Copy link

+1 Still a missing piece of info in the tutorial.

@kumargagan4
Copy link
Author

so what is the alternative ?
is it ok to keep the images on parse?

@christianmarth
Copy link

There's a pull request open #113 that adds supports for saving files on S3 as well as a migration tool for existing files and also a files adapter, at the moment it's still safe to keep files hosted on parse

@kumargagan4
Copy link
Author

@christianmarth thanks for reply
But there is nothing given in the turorial regarding this
If I keep the files on parse right now
So will they provide the option to migrate after some time even if I have finalized the migration
In the post you given link how to put that code because I am directly migrating to heroku or AWS
Sorry for asking this silly question actually I am not a server guy I am a iOS developer so these things a little complex for me.

@ndnguru
Copy link

ndnguru commented Feb 15, 2016

When I tried the migration tool to (transferring to MongoLab), I ran into an issue with files.

Here is my issue:
I started the migration of my data to a mongoLab db. Then when I went to MonoLab to verify, I noticed a big problem! On my _User collection, for example, I have a field 'photoFile', which stores an image (jpg, png, etc).

When I export the data to JSON using Parse's export tool from the data browser on Parse, I see sufficient data about that photoFile field (example below):

"photoFile": {
            "__type": "File",            
            "name": "tfss-XXX-XXX-ETC.png",
            "url": "http://files.parsetfss.com/asdfasdfasdf/tfss-XXX-XXX-ETC.png"
        }

Now, when I look in the new MongoLab collection for that _User collection, it just has the filename listed instead. No type or location data (URL) is provided as with the JSON export above:

"photoFile": "tfss-XXX-XXX-ETC.png"  

Questions:

  1. How do I know where to access my data!? No URL means no clue where the file is!
  2. Do I have to change the way I access data on the client side?
  3. How do we migrate files from parse file servers to our own S3 buckets?

@christianmarth
Copy link

You need to include your fileKey when initialising parse server.

fileKey - For migrated apps, this is necessary to provide access to files already hosted on Parse.

When you do a request that includes a file the full URL will be returned to you. You should be able to access files the same way on your client as previously so no change is needed on the client side.

For migration to S3 you'll need to wait until the files adapter is complete and the documents are updated regarding the migration.

@kumargagan4
Copy link
Author

@christianmarth will parse allow the file migration to s3 if I have already finalized the db migration to parse. since file migration is not available but I am doing the db migration now, or do I need to wait for the files adapter to complete to finialize the migration.

@christianmarth
Copy link

Yes wait for the file adapter to be completed then a migration tool will become available #8

Any new files uploaded using parse server will be hosted on parse.com and will still be accessible until the service is closed down in 2017

@kumargagan4
Copy link
Author

Thanks for your help
On Feb 16, 2016 7:51 AM, "Christian Marth" notifications@github.com wrote:

Yes wait for the file adapter to be completed then a migration tool will
become available #8
#8

Any new files uploaded using parse server will be hosted on parse.com and
will still be accessible until the service is closed down in 2017


Reply to this email directly or view it on GitHub
#420 (comment)
.

@lsdoodle
Copy link

Is there documentation on using your own s3 bucket?

@DebDutta2016
Copy link

DebDutta2016 commented Nov 14, 2016

I am also facing the same issue. I have migrated the database. Created s3 bucket. My migrated app is working fine now, but the image files are till on the Parse s3 bucket. What will I do now? I have followed the above steps but got no success.... No documentation found. Please Help!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants