How to backup Postgresql DB to an FTP site using Python

Using the standard tools of Postgresql pg_dump and Python's subprocess module we can call the command line tool via Python and have the dump file uploaded to an FTP site.  This is of course a very simple way to backup.

An alternative would be to use Pgbarman which is a higly effective way to minimize data loss.

Here you go:


Post a Comment

Popular posts from this blog

ogr2ogr Append new Shapefile to existing PostGIS table

OGR2OGR examples for Spatialite, PostGIS, Shapefiles

Stack font awesome icons with openlayers