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:


Comments

Post a Comment

Popular Posts