Add Docke Entrypoint
This commit is contained in:
@@ -7,7 +7,7 @@ nav_order: 1
|
||||
|
||||
# Backup database
|
||||
|
||||
To backup the database, you need to add `backup` subcommand to `pg-bkup` or `bkup`.
|
||||
To backup the database, you need to add `backup` command.
|
||||
|
||||
{: .note }
|
||||
The default storage is local storage mounted to __/backup__. The backup is compressed by default using gzip. The flag __`disable-compression`__ can be used when you need to disable backup compression.
|
||||
@@ -15,7 +15,9 @@ The default storage is local storage mounted to __/backup__. The backup is compr
|
||||
{: .warning }
|
||||
Creating a user for backup tasks who has read-only access is recommended!
|
||||
|
||||
The backup process can be run in scheduled mode for the recurring backups.
|
||||
The backup process can be run in scheduled mode for the recurring backups on Docker or Docker Swarm.
|
||||
On Kubernetes it can be run as CronJob, you don't need to run it in Scheduled mode.
|
||||
|
||||
It handles __recurring__ backups of postgres database on Docker and can be deployed as __CronJob on Kubernetes__ using local, AWS S3 or SSH compatible storage.
|
||||
|
||||
```yml
|
||||
@@ -27,10 +29,7 @@ services:
|
||||
# for a list of available releases.
|
||||
image: jkaninda/pg-bkup
|
||||
container_name: pg-bkup
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- pg-bkup backup -d database
|
||||
command: backup -d database
|
||||
volumes:
|
||||
- ./backup:/backup
|
||||
environment:
|
||||
@@ -54,7 +53,7 @@ networks:
|
||||
-e "DB_HOST=dbhost" \
|
||||
-e "DB_USERNAME=username" \
|
||||
-e "DB_PASSWORD=password" \
|
||||
jkaninda/pg-bkup pg-bkup backup -d database_name
|
||||
jkaninda/pg-bkup backup -d database_name
|
||||
```
|
||||
|
||||
In case you need to use recurring backups, you can use `--mode scheduled` and specify the periodical backup time by adding `--period "0 1 * * *"` flag as described below.
|
||||
@@ -68,10 +67,7 @@ services:
|
||||
# for a list of available releases.
|
||||
image: jkaninda/pg-bkup
|
||||
container_name: pg-bkup
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- pg-bkup backup -d database --mode scheduled --period "0 1 * * *"
|
||||
#command: backup -d database --mode scheduled --period "0 1 * * *"
|
||||
volumes:
|
||||
- ./backup:/backup
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user