I have deployed using mupx (multiple times) and the app is live. I lost my local files and I only have the files in the server.
Where are the app files located so that I can download?
I have deployed using mupx (multiple times) and the app is live. I lost my local files and I only have the files in the server.
Where are the app files located so that I can download?
Which files are you looking for? The bundled files should be in the /opt folder.
Iâm looking for everything except .meteor folder
Thatâs tough. The files are bundled together when you use mupx. AFAIK, there wouldnât be a way to access the original files once they are bundledâŚ
shit⌠there are already people using the app and I have to somehow restore the filesâŚ
I know it doesnât help now, but in the future, I strongly suggest something like github.
How did you lose the files?
I copied and replaced to the wrong folder⌠and the mac âundoâ just erases the files and doesnât bring back the old ones.
Time machine? Or something similar? I think you would have better luck trying to get your local files back than trying to get anything useful from a mup deployment.
Not really. I have a back-up with Time Machine but from a month ago.
And that doesnât have the files?
very old files⌠I worked on it almost everyday since thenâŚ
/opt/appName/current/bundle/programs/server/app seems to have all the server files put one after the other with nice commenting that describes the original file location, thatâs a start
but client files seems to be minifiedâŚ
Ah, yeah I forgot that the server files werenât minified. Good catch!
Where you using server side rendering by any chance (in which case your client files would be accessible from the server and should appear somewhere in the non minified code)
Is there a way to reverse engineer source maps?
Unfortunately, I didnât use SSR and the most important file I need is in client. I can rewrite everything but only one file would save my butt. I have my CSS, methods.js and the most important html file. Iâm gonna check the server again just to be sure anyway.
weird, I donât have anything under /opt/RPN/current/bundle/server
RPN is my app name
I mean, I have the folder but it doesnât show anything when I type 'lsâ
and âcd appâ says âapp: No such file or directoryâ
Weird. We might be using different versions of mup(x) but you should have the server file somewhere and thereâs no reason for it to be minified.
Yup getting the client only code will be a painâŚ
You should be able to find the minified, concatenated client js file in /opt/RPN/app/programs/web.browser
.
Itâll look something like this: 28db495099e91ab213198df35eab97aa9cf6253a.js
(with different letters and numbers).
Take that minified/uglified client code, and run it through this: http://jsbeautifier.org/
Itâll still be a ton of work to beat back into its original shape (splitting it into the correct files and renaming variables), but at least itâll be working code, which may be better than writing the whole client codebase again from scratch. Templates will already be compiled into js, so theyâll all need to be rewritten â thatâs pretty soul-destroying right there.
Youâll find the server files in /opt/RPN/app/programs/server/app
.
One issue youâre going to have is with shared code â removing it from the client files youâve recreated and from the server folder and putting it in folders that are shared (like /lib
in the app root directory). Luckily the server folder names should give a fairly clear indication of whatâs needed where in terms of shared and server only code.
Good luck. You have my heartfelt sympathy.
My strongest recommendation: get a Github account set up asap.