By Appsdev85
Hi Every one,
Kindly i have a droplet that i run my mobile app API backend on using (Laravel-Lumen + MYSQL DB) i need to update some of my API functions + run new migrations on the database, just wanna make sure that in case any thing goes wrong during my updates i can roll back to my droplet + all backend data.
So what is the best approach to this backup my droplet? or take a snapshot for it?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello @Appsdev85
I always before a backup before running large Laravel migrations so good thinking.
So the snapshot will do a full backup of the server which will cover the application code and the database before the migration. If goes wrong you will be able to restore the droplet to that point.
It may be worth also taking a database backup too, if your using Git rolling the code back will be easy but the database is more complex and restoring a backup can be the easiest way. You can do this via a MySQL GUI like phpmyadmin, table plus, sequalpro (depending on the database size for if this is practical) or you could use MySQLdump. I have a guide on our website for how to do all sorta tricks and tips for MySQLDump and how to copy them from the server to your local machine
Doing
Any questions feel free to hit me up love to help people with backups.
Simon Founder and CEO - SnapShooter DigitalOcean Backups + Laravel Backups
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.