nickbreen / docker-mysql-backup-cron Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
Hi,
it seems backup.sh and restore.sh are not part of the DockerFile, nor the crontab is in place.
can you update your project?
best regards,
Charles.
The packaged version is 1.1 and 1.6 is the current version - with the required command line parameters to specify the access key and secret
Hi,
/backup.sh works like a charm.
but when i want to list available backups via the /restore.sh command,
an error occurs :
ERROR: Bucket 's3:' does not exist
ERROR: S3 error: 404 (NoSuchBucket): The specified bucket does not exist
according to this line https://github.com/nickbreen/docker-mysql-backup-cron/blob/master/restore.sh#L14 , BUCKET should not start with 's3://' prefix, but this is required by the backup.sh command.
When i remove from the BUCKET variable the s3:// prefix, it lists available backups successfully, but further backups fail.
best regards,
Charles.
It's easier to just use .s3cfg
rather than fiddling with all the env vars.
E.g. this actually works!
environment:
S3_CFG: |
[default]
access_key = XXXX
secret_key = XXXX
bucket_location = ap-southeast-2
default_mime_type = application/x-gzip
CRON_D_BACKUP: |
@reboot root ln -s /etc/container_environment/S3_CFG /root/.s3cfg
@daily root (tar cz --verbose /var/www/wp-content/uploads | /usr/local/bin/s3cmd --verbose put - $$(cat /etc/container_environment/BUCKET)uploads.tar.gz) 2>&1 | logger --tag uploads
@daily root (/usr/bin/mysqldump -uwordpress -pwordpress -hdb -B wordpress | gzip | /usr/local/bin/s3cmd --verbose put - $$(cat /etc/container_environment/BUCKET)db.tar.gz) 2>&1 | logger --tag db
There's a @reboot
job that sets up the user's .s3cfg
file, which all the other jobs use.
This allows for far simpler cron job spec's and permits trivial specification of arbitrary jobs and arguments.
Hi,
thanks for your work.
Can you set a version when you publish your image to the docker registry?
all versions are actually bound to the 'latest' release, which prevent to select a specific one.
best regards,
Charles.
Currently hardcoded as root
and mysql
, also password is $MYSQL_ENV_MYSQL_ROOT_PASSWORD
, that should be specified too, with default fallbacks to the linked mysql
service.
I forked your project in order to modify it for my purpose. Can you please add license information so that I can show it on my project?
Hi,
i've tried to override the cron expression CRON_D_BACKUP with this expression :
CRON_D_BACKUP: "* * * * * root /backup.sh | logger"
,
but it does not seems to work....
I don't see any reference of CRON_D_BACKUP on the project, except in the Dockerfile.
How does the cron expression is set to the system?
best regards,
Charles.
Hi,
restoring database fails.
now sudo docker exec <docker_container_id> /backup.sh
and sudo docker exec <docker_container_id> /restore.sh
works, but
sudo docker exec <docker_container_id> /restore.sh <filename>
returns
ERROR: S3 error: 400 (Bad Request)
i've tried with or without the 's3://' prefix, but error is the same.
best regards,
Charles.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.