Skip to content

Instantly share code, notes, and snippets.

@valferon
valferon / postgres_manager.py
Created March 29, 2018 02:35
Python script to take care of postgres backup and restore of data
#!/usr/bin/python3
import argparse
import logging
import subprocess
import os
import tempfile
from tempfile import mkstemp
import configparser
import gzip