$ docker run camptocamp/pghoard
or
$ docker run --entrypoint <command> camptocamp/pghoard
where is one of pghoard
, pghoard_archive_sync
, pghoard_create_keys
, pghoard_postgres_command
or pghoard_restore
.
$ docker run -d --entrypoint /backup.sh camptocamp/pghoard
$ docker run -d -e PGHOARD_RESTORE=SITE=foo --entrypoint /restore.sh camptocamp/pghoard [--recovery-target-time <time>] [--recovery-target-xid <xid>]
Can be either pg_receivexlog
or archive_command
. If set to pg_receivexlog
, pghoard will start up a pg_receivexlog process to be run against the database server. You can also set this to the experimental walreceiver
mode whereby pghoard will start communicating directly with PostgreSQL through the replication protocol.
How many basebackups should be kept around for restoration purposes. The more there are the more diskspace will be used. (default 1)
How often to take a new basebackup of a cluster. The shorter the interval, the faster your recovery will be, but the more CPU/IO usage is required from the servers it takes the basebackup from. If set to a null value basebackups are not automatically taken at all. (default 24)
Can be either local
, s3
or swift
.
Directory for the path to the backup target (local) storage directory.
Determines log level of pghoard. (default INFO
)
Enables metrics sending to a statsd daemon that supports Telegraf or DataDog syntax with tags.
Can be either telegraf
or datadog
. (default telegraf
)
Enable encryption of backups, you also need to setup ENCRYPTION_KEYS_PRIVATE
.
This must be a RSA key like:
-----BEGIN PUBLIC KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END PUBLIC KEY-----
Provide the private key for encryption. This must look like this :
-----BEGIN PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END PRIVATE KEY-----
Site to restore locally from storage.
You can use make.sh
to build:
./make.sh
and optionnaly upload your images:
./make.sh myhubid/myrepositoryname