Skip to main content

Backing up and restoring Postgres databases using S3 for automation

Project description

elefant
---

Allows you to backup and restore your Heroku database
using your own private storage in S3. This allow circumventing
the backup limit in Heroku plans and also gives peace of mind
that your data is backed up somewhere else besides Heroku.

Tested on Postgres 9.4.

Usage:

* Ensure AWS credentials are set up in environment variables
* Ensure heroku is logged in with $ heroku login

## Example

```python
from elefant import Elefant


# create Elefant object, passing in the Heroku app name
hb = Elefant("myapp")

print "Making and backup and uploading to S3..."
hb.backup()

print "Availiable backups:"
backups = hb.backups
for b in backups:
print b.name

print "Restoring from most recent backup..."
hb.restore(b)

print "Restoring from most recent backup using a string..."
hb.restore(b.name)
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Elefant-0.0.3.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file Elefant-0.0.3.tar.gz.

File metadata

  • Download URL: Elefant-0.0.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Elefant-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8166bdfe7e9a62c0a14044fb0da187ae0e91cae2259ac5740d9e53cb1898ff94
MD5 680d86604b99500120ae4147039d8f0e
BLAKE2b-256 0ff2243f04918e548e6799f5abd4c2cd3fe1bf92c4397b2f8f15b8a7771e9c7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page