add: update description

This commit is contained in:
2024-10-17 19:37:58 -03:00
parent c073aebf16
commit 3a2d6f32f0

View File

@@ -1,3 +1,27 @@
# database-backup # Database Backup
Docker container able to do a backup from databases through network access Periodically do a backup of a database
This app uses [Ofelia](https://hub.docker.com/r/mcuadros/ofelia) to schedule a backup routine which may store one or more databases according to configuration.
## Configuration
Setup is made populating the _BACKUP_DATABASES_ environment variable with a list of backup configuration. Each backup setup must be in a single line and have two items: a database URL and a cron-like string indicating the periodicity of the backup.
### Examples
All examples listed refer to the (hipotetical) *mysql* server *mydatabase.com.br* logged with the username *db_user*:
- *schema*: mysql (at this moment is the only database supported)
- *username*: db_user
- *host*: mydatabase.com.br
mysql://db_user:123456@mydatabase.com.br:3306/database-to-backup @hourly
- *password*: 123456 (login will be attempted with this password)
- *port*: 3306 (as it is the default port for mysql it could be ommited)
- *database*: database-to-backup (only this database are going to be backuped and ommiting this value will vary depending on the database, generaly meaning backuping all accessible databases)
- *schedule*: @hourly (each 60 minutes, with the first occurence 60 minutes after starting the system)
mysql://db_user:123456@mydatabase.com.br 0 0 1 * * *
- *password*: 123456 (login will be attempted with this password)
- *schedule*: 0 0 1 * * * (in (GO implementation cron format)[https://godoc.org/github.com/robfig/cron])meaning on this case every night at 01h00)
mysql://db_user@mydatabase.com.br/* @daily
- *schedule*: @daily (onde a day starting 24h from starting)