Skip to content

Instantly share code, notes, and snippets.

@Labyo
Labyo / postgres_manager.py
Created August 15, 2021 05:53 — forked from valferon/postgres_manager.py
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