We highly advice to have your App in a local development environment running all the time. Your development setup should also be your master where development happens first and which is kept up-to-date in terms of contents. Please see local development article for more.
But there are some real world scenarios why downloading the remote App might still be needed:
- A new developer is joining the project
- A previous developer has left without transferring the project in a responsible manner
- Your harddisk crashed or you have accidentally deleted your local setup somehow
Your App on fortrabbit consists of different parts that play together to display a functional website or application. The different parts need to be treated separately. The steps required are depending on your previous deployment workflows. Choose what matches best for you:
When you deployed by Git here before, you can clone the existing Git repo from fortrabbit. Please follow the steps in our Git guides to clone down the code. The benefit is that the Git repo contains all the history of the project as well. Make sure that the Git repo is an up-to-date state.
After cloning the Git repo, you might need to install the dependencies to make your local installation complete. The
composer.json contains all the instructions. Run
composer install locally in your root folder. See our Composer article for more details.
Beside the code base which you might have received via Git, take care to grab assets and runtime data as well. This can be some compiled CSS/JS files that got deployed along with pipelining or uploads done by users of the application.
Pro Apps have ephemeral storage. So the files you have received from git clone, plus the dependencies installed via Composer should cover up the entire code base. Pro Apps can have an additional Object Storage. Please download all assets required from the Object Storage directly using a local S3-compatible client. Get more details on Object Storage access here.
Universal Apps have persistent local storage. Remember Git works in one direction only here. So you might find files, like uploads, that are not covered with the Git repo, or files in the Git repo are not up-to-date. Options on your disposal:
- Login by SFTP and just download what is required - see here
- Login by SSH, zip the files and question and them from a public URL - see here
- Use rsync to download a folder or even the entire project - see here
You can use the methods above for the whole code base when you haven't been deploying with Git before or you are unsure if the git repo contains the latest changes.
Last not least you likely will need the contents of your database. Use a local MySQL client to connect to your fortrabbit database and export a dump of it. Detailed instructions over here.
When the above is not working for you for some reason, you might just use our backups (when booked) as a source. Some plans on the Universal Stack have backups enabled. With that you can download the latest state (yesterday) as two files: code and MySQL database directly from the Dashboard. Please understand that this does not include the Git repo but just the files deployed and generated on the App itself. For Pro Apps backups are only optionally available for MySQL, since code is fully covered with Git.
We highly advice to double-check your new backup for completeness. You can run diffs on other copies. We also advice to run your App locally and see it with your eyes.
If in doubt, don't hesitate to contact us. We are here to give technically guidance and help. Please mind fortrabbit is self service for developers. We might not be able to assist the non-technical business owner with this.