Edit (Added work with the database)

db.backup - backup postgresql db
work_base.php - server script on php to read and write data