chimit
November 24, 2021, 12:24pm
1
Hi!
I’m trying to migrate a blog from Medium to self-hosted Ghost. I successfully created a zip backup of Medium which is more than 100Mb.
I can’t upload this file via the Ghost dashboard due to an error:
Import failed
Request is larger than the maximum file size the server allows
Even though I did this: How to resolve image upload issues in Ghost . Apparently, these instructions are irrelevant to the importing tool.
Then I tried another way - import through the Ghost CLI. I uploaded my zip backup and ran:
$ ghost-mgr@ghost-ubuntu-s-1vcpu-1gb-amd-sgp1-01:/var/www/ghost$ ghost import gh-medium-export-livi-1637746050927.zip
Killed
But as you see get a “Killed” response without any details. Even with the --verbose
flag.
Any suggestions would be appreciated!
P.S. Ghost was installed from the DigitalOcean Marketplace.
Kevin
November 24, 2021, 12:32pm
2
A Medium export zip is not the same as a Ghost export zip so you can’t import one directly into the other.
There are some docs for migrating from Medium here:
chimit
November 25, 2021, 1:37am
3
Yes, my Medium backup was created using @tryghost /migrate
And it was created successfully:
migrate medium medium-export-livi.zip
info Skipped files: 18
✔ Initializing Workspace
→ Workspace initialized at /var/folders/h9/4hf04ywn79ngy8gvvck5cp880000gn/T/mg/002547a4ea3c297a500667b2bd1d582e-medium-e…
✔ Read Medium export zip
✔ Fetch missing data via WebScraper
Total: 114. Complete: 114, Failed: 0, Skipped: 0, Disabled: 0
✔ Build Link Map
✔ Format data as Ghost JSON
✔ Fetch images via ImageSraper
Total: 4119. Complete: 4119, Failed: 0, Skipped: 0, Disabled: 0
✔ Update links in content via LinkFixer
Total: 114. Complete: 114, Failed: 0, Skipped: 0, Disabled: 0
✔ Convert HTML -> MobileDoc
Total: 114. Complete: 114, Failed: 0, Skipped: 0, Disabled: 0
✔ Write Ghost import JSON File
✔ Write Ghost import zip
ok Successfully written output to /Users/user/medium_import/gh-medium-export-livi-1637746050927.zip in 175083ms.
DonaldH
November 25, 2021, 2:09am
4
Hello @chimit and welcome to the Ghost community!
This might help you:
I seem to be facing something similar.
I’ve updated client_max to 5G and it still won’t start the import process.
Any ideas on what else could be throwing it off?
The first thing to note is the part about NGINX config and also, if you are using Cloudflare, apparently their free CDN has a limit of 100MB upload.
chimit
November 25, 2021, 2:21am
5
Thanks for the answer! I’ve read that topic but I think it’s not my case. I’m using Cloudflare but proxy function is disabled for Ghost domain. So Cloudflare is only a DNS.
chimit
November 26, 2021, 1:22am
6
As I see in the zip backup there is a JSON file and a “content” folder which looks very similar with the standard “content” folder in a Ghost installation. I guess I can just copy this folder and import only the JSON file.
But there are 2 problems that stop me from it:
I’m not sure it’s the right way. It’s not documented anywhere.
There is a mess with files/folders owners in the DO droplet: some folders belong to root
, some to ghost
, others to ghost-mgr
. Again, it’s not documented.
chimit
November 26, 2021, 1:22am
7
P.S. Please, remove this ridiculous limitation: “Sorry, new users can only put one embedded media item in a post.”
chimit
November 26, 2021, 3:45am
8
OK, I did it and seems the plan above works.
Just need to change folders permissions after uploading them via SFTP:
$ chown ghost:ghost /var/www/ghost/content/images -R