Python script for rotating backups of postgres databases