Editor corrupted my whole file and auto-saved, any way to roll back?


#1

I found an elegant solution to a problem and put it in my server.js. I moved the computer to another room with what was probably in hindsight a worse internet connection and there I re-formatted the entire document and filled in some placeholders. For a moment I was reading and not even typing, when suddenly the error log lit up, and the whole document was scrambled and mostly replaced with whitespace.

Unfortunately I did not see that this affected the whole document at first, since only one affected line was scrolled onscreen. Figuring the glitch application had reached an invalid state, I entered “refresh” at the command line, which I guess lost all my undo history. I came back and noticed that the rest of my file had also been destroyed in the incident.

Do you know how to roll back my server.js file to the latest version that compiles? The project is named encyclopediaofcode.

Others have posted of awful experiences about missing features to protect the user from auto-save mishaps (in this case, not even a mishap of my own doing or on my end, but likely connectivity based). Count this as another. Code losses of any kind hugely impact my likelihood of continuing. Please let me know if I can revert.


#2

Sorry for the problems. I can take a look for you. If you mail me a project join link, then I can roll it back for you.


#3

I figured that was possible, thank you. The share link:

edit: Oh I see, I shouldn’t share it to the whole forum. Share link is in the copy of this I e-mailed to you

Even if recoverable it’s still a punch in the gut to be mentally on a roll and have to stop faced with potential loss of everything though. I have a presentation on Friday and the big site idea I’m pitching uses glitch.com to work, so I can’t afford too many pauses or stressful moments. I’ll keep an external editor open, and until the presentation I’ll rely on it so I don’t let my guard down and forget to back up.

But meanwhile and for everyone’s benefit there have got to be some low-hanging-fruit fixes possible to prevent having to ask for manual rollbacks after a bad auto save. A revision history sure, but in lieu of implementing that even just a confirmation question that comes up off to the side if anything suspicious happens to the document (a big reduction in size at once, or a huge text replacement, especially in several cursor locations as may have been true in my case, for instance) and auto-save suspends itself until the user clicks the confirmation?

Thanks for the quick response and trying to recover the file for me, and for the great site.


#4

I’ve rolled it back to a previous version which runs, but let me know if that’s too early a version.

For backups, then there’s the ability to download a zip, and export to GitHub from the top-left project info menu.

But for sure, no data loss is acceptable and we’re working on better options to prevent and work around such problems.


#5

That’s right, I’ve hidden the revision so there’s no public record of it.


#6

Great! That’s almost the latest one. I added some more after that iteration but might not have had the internet; on your end it might look like the next iteration after that is the gibberish one. If it’s not too much trouble could you check though just in case? Thanks!

Also thanks for covering my tracks on that post edit, hah.

I figured since this is a forum I’d probably get a reply after my meeting Friday, or at best a day later, costing me a day. I never dreamed you’d be watching your phone and supporting the site in real time.


#7

I know there’s not much there in that 100-line-ish file, but it’s a lot harder for me than it looks. Some of it reflects stuff I just learned that I’m scared of un-learning.


#8

I’ve restored the next version, is that a better one?


#9

It’s still a ways back, but it looks like it’s already partially corrupted (that corrupted line 2 is already what it showed me after everything was wiped out) so I’ll bet none of the other changes I made with flaky internet stuck but rather each further corrupted different parts of it more.

It’s ok, that iteration still a LOT better than starting over, and I can mostly remember the remaining stuff I added. I’ll go ahead and start editing again.

Thanks so much! Saved some heartbreak and future uncertainty as to if I’m doing it the same way or not. Glitch is an increasingly crucial service and idea, and I’m glad it not only exists but is being cared for this well by support who are seeing it through to success.


#10

Have there been any updates to allow for individuals to roll back projects? I had a similar importing mistake and I’m wondering what my options are to get my work back. Thank you in advance! @Gareth


#11

I responded to your email yesterday, but just in case you missed it: You can rollback projects yourself, you just need to know how to use Git - if you do, then you can do it from the terminal under Advanced Options from the top-left project info menu.

However, if you let us know your project name and approximately when you’d like it rolled back to, we can sort it for you.


#12

Thank you so much for your quick response! For some reason your email was sent to my spam folder so my apologies for not seeing it until now. This is great to know, I’ll start on that!