Hi All,
I have an online mysql based application hosted in a droplet. I use a script to automatically backup my dB’s to my DO server every 6 hours. Is there a better/safer way to do these backups and how can I copy my backups to my DropBox account, or similar?
Regards
Gary
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!
Hi Kalin,
Genius!!
My problem solved. I’m going to try it now.
Many Thanks
Gary
Hi garywilliams,
It’s generally not a great idea to store your backups the same place your files are. If there is data loss, you’ll lose both the backups and the files. Backups should be stored remotely so in that regards, using Dropbox is a good solution.
Using Dropbox to backup your date
Download Dropbox to the server
64-bit: cd ~ && wget -O – “https://www.dropbox.com/download?plat=lnx.x86_64” | tar xzf –
Run the dropbox daemon
~/.dropbox-dist/dropboxd
Running it for the first time, running the daemon will say something like
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=6bc8fb27643bc6c1d91264afe135f2ba to link this device.
Visit the link from your browser and link your server with your dropbox account. Once you do, your Dropbox folder will be created in your home directory.
~/Dropbox
Now you have Dropbox configured on the server. To actually backup your databases to Dropbox, change your script to dump the .sql file in your ~/Dropbox folder. From there, your files will be automatically synced with your account.
You can set a cron job to do that for you as well.
That’s it!
Kind regards, Kalin D.
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.