Skip to content

🔨Simple bash script for dumping MySQL database from docker container and sending it to the dropbox🔨

License

Notifications You must be signed in to change notification settings

czende/cron-docker-dump-dropbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🔨Simple bash script for dumping MySQL database from docker container and sending it to the dropbox🔨

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages