Dkup doesn't use any local database and automatically sync with your storage provider (S3 for now) to manage backups lifecycle.
You can find latest release here: https://github.com/agence-webup/dkup/releases
{
"awsAccessKeyId": "HERE_YOUR_AWS_ACCESS_KEY",
"awsSecretAccessKey": "HERE_YOUR_AWS_SECRET",
"awsBucket": "HERE_YOUR_AWS_BUCKET",
"command": "pliz backup -q --files --db -o @FILENAME",
"fileExtension": "zip",
"instantToKeep": 3,
"projects": [
{
"slug": "project1",
"path": "/path/to/project1",
"pingUrl": "https://example.com/project1",
"frequencies": ["monthly:1", "weekly:4", "daily:7", "hourly:4"],
"instantToKeep": 2,
"command": "custom command @FILENAME",
},
{
"slug": "projet2",
"path": "/path/to/project2",
"pingUrl": "https://example.com/project2",
"frequencies": ["monthly:1", "weekly:1", "daily:1", "every4hours:6"]
}
]
}
slug
a string which will be used to store the file on s3path
path to the docker-compose + pliz projectpingUrl
an URL to call when the backup is donefrequency
a string which respect the following formatperiod:number_of_backups_to_keep
period
: hourly, every4hours, daily, weekly or monthlynumber_of_backup
: the number of backup files to keep for the period (1 will keep one backup file, 3 will keep three backup files, 0 for no limit)
instantToKeep
: number of instant backups to keep (global or per project option), default is 5fileExtension
: extension to use (global or per project option), default set to tar.gzcommand
: command used to backup (global or per project option), @FILENAME is replaced with backup filename
Note: dkup will automatically detect https://healthchecks.io as a provider and enhance log with errors
Usage: dkup [options] [command]
A small utility to perform backup on docker-compose projects
Options:
-c, --config <path> config path
-V, --version output the version number
-h, --help display help for command
Commands:
now [project] start an immediate backup
schedule [options] check and execute backup based on frequencies
list list all projects
help [command] display help for command
dkup --config /etc/dkup/dkup.json now
dkup --config /etc/dkup/dkup.json now project1
You need to execute dkup every hour. An example with cron:
@hourly dkup --config /etc/dkup/dkup.json schedule
dkup --config /etc/dkup/dkup.json schedule --test
dkup --version
[18:07:32] projet1 | Run custom command -> pliz backup -q --files --db -o projet1-20220713_182532.tar.gz
[18:07:32] projet1 | Processing scheduled backup
[18:07:32] projet1 | Upload projet1-monthly-20220713_182532.tar.gz to s3
[18:07:33] projet1 | Upload projet1-weekly-20220713_182532.tar.gz to s3
[18:07:33] projet1 | Upload projet1-daily-20220713_182532.tar.gz to s3
[18:07:33] projet1 | Upload projet1-hourly-20220713_182532.tar.gz to s3
[18:07:33] projet1 | Upload projet1-every4hours-20220713_182532.tar.gz to s3
[18:07:33] projet1 | Delete local file /projects/projet1-20220713_182532.tar.gz
[18:07:33] projet2 | Run custom command -> pliz backup -q --files --db -o projet2-20220713_182533.tar.gz
[18:07:34] projet2 | Processing scheduled backup
[18:07:34] projet2 | Upload projet2-monthly-20220713_182533.tar.gz to s3
[18:07:34] projet2 | Upload projet2-weekly-20220713_182533.tar.gz to s3
[18:07:34] projet2 | Upload projet2-daily-20220713_182533.tar.gz to s3
[18:07:34] projet2 | Upload projet2-hourly-20220713_182533.tar.gz to s3
[18:07:35] projet2 | Delete local file /projects/projet2-20220713_182533.tar.gz