Backup MySQL to Dropbox (supports periodic backups & mutli-files)
2.9K
Backup MySQL to Dropbox (supports periodic backups & mutli files)
$ docker run \
--name mysql_backup \
-d \
--restart=always \
--log-opt max-size=1m \
--log-opt max-file=5 \
-e MYSQL_USER=root \
-e MYSQL_PASSWORD=root \
-e MYSQL_HOST=mysql \
-e DROPBOX_ACCESS_TOKEN=YOUR_TOKEN \
-e SCHEDULE=@daily \
suin/mysql-backup-dropbox
MYSQLDUMP_OPTIONS mysqldump options (default: --quote-names --quick --add-drop-table --add-locks --allow-keywords --disable-keys --extended-insert --single-transaction --create-options --comments --net_buffer_length=16384)MYSQL_HOST the mysql host requiredMYSQL_PORT the mysql port (default: 3306)MYSQL_USER the mysql user requiredMYSQL_PASSWORD the mysql password requiredDROPBOX_PREFIX path prefix in your Dropbox (default: empty)DROPBOX_ACCESS_TOKEN your Dropbox API access token requiredSCHEDULE backup schedule time, see explainatons belowYou can additionally set the SCHEDULE environment variable like -e SCHEDULE="@daily" to run the backup automatically.
More information about the scheduling can be found here.
Visit the Dropbox app creation page, and fill following fields in there.

Once an application have created, you should press "Generate" button to generate your access token:

Content type
Image
Digest
Size
13.2 MB
Last updated
about 8 years ago
docker pull suin/mysql-backup-dropbox