Download application files, repository deleted

So I had not published the project to a cloud repository such as github, and the system on which the files were is gone, however the project is still hosted on and is live, how do I download the app from fly and get the files back.

It was a laravel project deployment was done using fly io

You can use fly ssh console -a YOUR_APP to start an SSH session and look around the VM for your project (probably in /app). [Edit: actually /var/www/html for Laravel, see below]

Once you find it, you can download it by exiting out of the SSH session and running

fly sftp shell -a YOUR_APP 
get /app

Note that there may be differences compared to the original source code (e.g. files ignored using .dockerignore will be missing).


@tom93’s got it right - the files in a Laravel install are usually in /var/www/html within the VM.

Good luck - that’s not a fun situation to be in, but it should have most of the important files you want in there!

Let us know how it goes.


thanks @tom93 @fideloper-fly

Hi @fideloper-fly I was able to download the files however .env files were missing, I guess some gitignores as well, is that intentional behaviour?

Correct, in fact there never likely was a .env file there - they are in the .dockerignore file by default. Instead needed env vars will be a mix of config in the fly.toml file and secrets set in the app.

If you SSH into the VM and run printenv you should see all environment variables, which should also show your env vars / secrets.

1 Like