Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Apr 16, 2015
1 parent 9c17001 commit 8c6f0c9
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 2 deletions.
73 changes: 72 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,72 @@
# docker-pg-backup
# Docker PG Backup


A simple docker container that runs PostGIS backups. It is intended to be used
primarily with our [docker postgis](https://github.com/kartoza/docker-postgis)
docker image. By default it will create a backup once per night in a nicely
ordered directory by year / month.

Visit our page on the docker hub at: https://github.com/kartoza/docker-pg-backup


## Getting the image

There are various ways to get the image onto your system:


The preferred way (but using most bandwidth for the initial image) is to
get our docker trusted build like this:


```
docker pull kartoza/pg-backup
```

To build the image yourself without apt-cacher (also consumes more bandwidth
since deb packages need to be refetched each time you build) do:

```
docker build -t kartoza/pg-backups .
```

If you do not wish to do a local checkout first then build directly from github.

```
git clone git://github.com/kartoza/docker-postgis
```

## Run


To create a running container do:

```
docker run --name="backups" --hostname="pg-backups" -link db -i -d kartoza/pg-backups
```

# Specifying environment

**Note:** This is not implemented yet:

You can also use the following environment variables to pass a
user name and password etc for the database connection.

Variable | Expected | Default if not specified
---------|----------|--------------------------
PGUSER | <user> | docker
PGPASSWORD | <password> | docker
PGPORT | <port> | 5432
PGHOST | <hostname / ip> | db
PGDATABASE | <database name> | gis

Example usage:

```
docker run -e PGUSER=bob -e PGPASSWORD=secret -link db -i -d kartoza/pg-backups
```


## Credits

Tim Sutton ([email protected])
April 2015
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker run --name="cron" --hostname="cron" -link watchkeeper_db_1 -i -d kartoza/pg-backups
docker run --name="backups" --hostname="pg-backups" -link db -i -d kartoza/pg-backups

0 comments on commit 8c6f0c9

Please sign in to comment.