With web hosting ending, I’d like to download all my projects in a single zip (because I have a lot). Having this be possible would help me and other project migrators a lot.
@potch has worked on a utility before that helps export public projects GitHub - potch/glitch-project-export
This might be my first post in a while, but please add this as a built-in feature, I’m sure lots of other people have this issue but unfortunately while the auto friendly word naming of projects is extremely neat for experimenting and tinkering it is also a bit of a curse when it comes to organizing things, there are likely a lot of projects I have that I’d be intresting in maintaing a copy of but haven’t named properly and I’d hate to lose them or have to manually grab the downloads for.
actually, can @glitch-staff confirm if a mass export tool will be built in-house or not? people are asking me about it but i don’t know and it’s best to find out sooner than later so the community can jump in with their own options.
Good question! We’re wrapping up work on redirects right now, and prioritized that work, migration guides, and individual project downloads to ensure as many migration paths as possible. We don’t have plans to build a mass export tool, but will amplify any/all community solutions we see.
for people’s information about this tool: it downloads the projects via git clone
. this leaves out data that’s not under version control
does that exclude .env vars and assets then?
yeah I think the big things will be
- code → glitch built in download includes this; git clone includes this
- .env → glitch built in download includes this
- .data → glitch built in download includes this
- .gitignore’d files → glitch built in download includes this
- node_modules → probably just run
npm install
. you’re on your own if you somehow put data here - assets → you’ll have to get these manually or build something to do it based on your .glitch-assets file
I would like to download my private projects too, automatically. I might end up making some kind of Tampermonkey userscript or something that reads the projects page and downloads them all. Kinda disappointed that glitch doesn’t offer this since it’s making everyone move their projects anyway.
Edit: Gonna try the .sh tool wh0 made
Edit two: Worked, very cool, still wish this was built-in
isn’t exporting all user data in one click actually required by gdpr?
I’ve written up a python script for downloading all your projects, with asset downloading (but not source code rewriting) over on https://gist.github.com/Pomax/19244d583bac820492847a8a4bc15e4e, you can either invoke it directly, in which case it’ll ask you for your glitch user id and persistent token (both can be found in your browser’s localStorage.cachedUser
for glitch.com, the script will tell you how to look them up when you run it) or it can be called as python3 download.py youruserid yourusertoken
and then it’ll just start running without asking you to type anything.
This should work on both Windows and *n*x but you kind of want tar
to be available (always true on *n*x flavours, including MacOS, but not necessarily on Windows). If you don’t, then all this script does is download your project archives, without any sort of unpacking or automatic asset downloading.
It’s probably not perfect, but it should get most of the job done, so if you run into any problems with it let me know either here or as gist comment and I can try to get things fixed up when I have time (or if you know the fix, drop some code in a gist comment =)
Thanks for this… works well and the resulting directory structure is nice and organized.
I’ve got a handful of projects where .glitch-assets
points to urls at cdn.hyperdev.com which has an expired SSL cert. Adding
.replace("https://cdn.hyperdev.com", "https://cdn.glitch.me")
to the “bad url handling” section seems to get me unblocked.
Thanks again
Yeah, I ran into that as well and honestly the only way to fix that is for us to figure out how to get that cert fixed up for the next few weeks. I don’t want to just ignore SSL errors and “what do you know, tomorrow suddenly someone else owns the domain and everything goes wrong” =D
That said: for anyone willing to live the wild life, you can tell Python to ignore certificates entirely by starting the script with a request context that basically disables SSL certificates. A casual web search, or Stackoverflow search, will teach you exactly how to do that.