Apr 10, 2018

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 https://www.pgbarman.org/ which is a higly effective way to minimize data loss.

Here you go:


No comments:

Post a Comment