1

I am about to embark on a project which will require a lot of documentation and since I have a spare Pi, I think it would be really useful to use it to store this documentation in a custom MySQL database. Now of course this is very important information to me and I don't want to lose it so what I want to do is back the database up daily and then upload that to some sort of cloud storage. I prefer OneDrive but Dropbox would do as well.

Does anyone know if this is possible? I don't really want to install any sort of client, all I want a script to do is grab the latest MySQL backup, and upload it to perhaps a shared directory on one of the aforementioned cloud services.

I found the below link which I'll try, so if anyone has used it and can provide feedback, that would be good.

https://github.com/fkalis/bash-onedrive-upload

Any assistance would be greatly appreciated!

0

1 Answer 1

2

Yes, this should be possible.

For that purpose I would write a simple shell script which consists of 2 parts:

  1. Create a backup of the database
  2. Upload that database dump to %cloudStorage

Then I would set up a daily cronjob that executes that script.

You can try to search for something like mysqldump for part 1, and bash upload dropbox for part 2. Check also the documentation about cronjob to automate the process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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