1

I have a small app that uses MySQL. I'm on a small Ubuntu box using Apache on Digital Ocean. In case anything ever goes wrong, I would like to have something that periodically sends me or downloads in some way a backup of my database.

My database contains personal information like emails and plain text passwords (haha), so I don't want to do anything where that data could be stolen along the way.

Is the best way to keep backups just to periodically do a database dump and then download that file or is there some more sophisticated way that I'm missing? What do people usually do to protect their data and make sure they have something in case they get compromised?

Thanks

  • 1
    The question is too broad. – Deer Hunter Jul 15 '14 at 7:10
  • 1
    Encrypt them. Make secure copies of the keys, and test your restores. See this question for more details. – MadHatter Jul 15 '14 at 7:12
2

There is no best[tm] way. But you basically need to consider three steps:

  1. Data export: an SQL dump is fine (for all smallish databases without performance issues).
  2. Encryption (optional, but recommended): simply add PGP to the pipe, very easy because you only need your public key on the server.
  3. Copy off-site: move the backup files somewhere else, e.g. your homeserver or cloud storage.

I personally use duplicity (does PGP+rsync) for my desktop and tarsnap (does encrypt+copy to AWS S3) for my servers.

0

Try this: http://meskyanichi.github.io/backup/v4/

Its a very easy tool written in Ruby that can backup to Dropbox, S3, Rsync and more and also support Encryption with OpenSSL or GPG.

I use it in my personal server and I really recommend it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.