fix locking bug
add postgres backup script