Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.16 KB

README.md

File metadata and controls

51 lines (40 loc) · 1.16 KB

CRON - DOCKER - DUMP - DROPBOX

Why?

Just because I needed it.

Prerequisites:

  • ubuntu or debian
  • curl installed
  • cron installed
  • docker installed
  • running MySQL docker container with some database
  • gzip installed
  • MySQL docker container ID (you can retrieve it by 'docker ps')
  • your dropbox oAuth token

Description

This simple script will just set up cron to perform:

  • mysqldump from running database
  • store dump on your host
  • send it to the dropbox folder
  • remove dumps from your host

You will be prompted to enter:

  • MySQL container ID
  • MySQL database name
  • MySQL user
  • MySQL password
  • dropbox oauth token
  • path for storing dumps on host
  • path for sending dumps to the Dropbox
  • cron scheduling for dumping
  • cron scheduling for sending
  • cron scheduling for removing (optional)

Getting started

Download the script using this command:

curl "https://raw.githubusercontent.com/Czende/cron-docker-dump-dropbox/master/cddd.sh" -o cddd.sh

Then give the execution permission to the script and run it:

chmod +x cddd.sh
./cddd.sh

Thanks to this excelent Dropbox Uploader