Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.14 KB

README.md

File metadata and controls

24 lines (17 loc) · 1.14 KB

GPNN Mail backup

Introduction

This is a script that gathers the mail data from docker-mailserver and uploads them to a defined S3 bucket.

Usage

This is meant to run as a cronjob repeatedly. To run this:

  • Git clone this.
  • Use GPG to decrypt the secrets.json.gpg file.
  • Update any settings as required
  • Add the python file to your root user's crontab

Monitoring

Monitoring is done by newrelic by gpg decrypting the newrelic.ini file and running the python script with newrelic-admin run-program.

NewRelic Dashboard

Helpful notes:

To encrypt: gpg --symmetric --cipher-algo AES256 filename.ext

To decrypt: gpg --decrypt filename.ext.gpg > filename.ext

Full run command: NEW_RELIC_CONFIG_FILE=newrelic.ini NEW_RELIC_SHUTDOWN_TIMEOUT=2.5 newrelic-admin run-program python backup.py